home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / OGRID110 / MANUAL.TXT < prev    next >
Text File  |  1995-06-01  |  431KB  |  15,436 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                               OOGrid Library(TM) v1.0
  27.                       for Borland/Turbo Pascal (Real Mode/TV)
  28.  
  29.  
  30.                                  Copyright (C) 1994
  31.                                  by Arturo J. Monge
  32.  
  33.  
  34.                           Portions Copyright (C) 1989,1990
  35.                            by Borland International, Inc.
  36.  
  37.  
  38.                               OOGrid Library(TM) v1.0
  39.                                    Documentation
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.    TABLE OF CONTENTS
  72.  
  73.  
  74.    ABOUT THE DOCUMENTATION . . . . . . . . . . . . . . . . . . . . . . . . .   1
  75.  
  76.    HOW TO CONTACT THE AUTHOR . . . . . . . . . . . . . . . . . . . . . . . .   1
  77.  
  78.    I. UNITS DESCRIPTION  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
  79.         GLEQUATES.PAS Unit . . . . . . . . . . . . . . . . . . . . . . . . .   3
  80.         GLSORT.PAS Unit  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  81.         GLSUPPRT.PAS Unit  . . . . . . . . . . . . . . . . . . . . . . . . .   4
  82.         GLTSHEET.PAS Unit  . . . . . . . . . . . . . . . . . . . . . . . . .   4
  83.         GLTVR_US.PAS Unit  . . . . . . . . . . . . . . . . . . . . . . . . .   4
  84.         GLVIEWS.PAS Unit . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  85.         GLWINDOW.PAS Unit  . . . . . . . . . . . . . . . . . . . . . . . . .   5
  86.  
  87.    II. IDENTIFIERS DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . .   6
  88.         BlockOperation type  . . . . . . . . . . . . . . . . . . . . . . . .   6
  89.         CellPos type . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6
  90.         CellTypes type . . . . . . . . . . . . . . . . . . . . . . . . . . .   6
  91.         ChangeHeaderDialog function  . . . . . . . . . . . . . . . . . . . .   6
  92.         ChangeXXXX constants . . . . . . . . . . . . . . . . . . . . . . . .   7
  93.         ClipBoard variable . . . . . . . . . . . . . . . . . . . . . . . . .   7
  94.         ClipBoardRecord type . . . . . . . . . . . . . . . . . . . . . . . .   7
  95.         cmXXXX constants . . . . . . . . . . . . . . . . . . . . . . . . . .   8
  96.         ColStartArray type . . . . . . . . . . . . . . . . . . . . . . . . .   9
  97.         CommasPart constant  . . . . . . . . . . . . . . . . . . . . . . . .   9
  98.         CreateOOGLDialogs procedure  . . . . . . . . . . . . . . . . . . . .   9
  99.         CreateOOGLStrings procedure  . . . . . . . . . . . . . . . . . . . .  10
  100.         CSheetInputLine constant . . . . . . . . . . . . . . . . . . . . . .  11
  101.         CSpreadSheet constant  . . . . . . . . . . . . . . . . . . . . . . .  11
  102.         CSpreadSheetWindow1 constant . . . . . . . . . . . . . . . . . . . .  12
  103.         CSpreadSheetWindow2 constant . . . . . . . . . . . . . . . . . . . .  13
  104.         CSpreadSheetXXXX constants . . . . . . . . . . . . . . . . . . . . .  14
  105.         CurrencyCharPart constant  . . . . . . . . . . . . . . . . . . . . .  14
  106.         CurrencyPart constant  . . . . . . . . . . . . . . . . . . . . . . .  15
  107.         CurrencyShift constant . . . . . . . . . . . . . . . . . . . . . . .  15
  108.         CurrencyStr type . . . . . . . . . . . . . . . . . . . . . . . . . .  15
  109.         DecPlacesPart constant . . . . . . . . . . . . . . . . . . . . . . .  16
  110.         DefaultXXXX constants  . . . . . . . . . . . . . . . . . . . . . . .  16
  111.         DisplayMessage function  . . . . . . . . . . . . . . . . . . . . . .  17
  112.         DisplayXXXX constants  . . . . . . . . . . . . . . . . . . . . . . .  18
  113.         EditXXXX constants . . . . . . . . . . . . . . . . . . . . . . . . .  18
  114.         Empty variable . . . . . . . . . . . . . . . . . . . . . . . . . . .  18
  115.         EraseMessage procedure . . . . . . . . . . . . . . . . . . . . . . .  19
  116.         FixFormulaCol procedure  . . . . . . . . . . . . . . . . . . . . . .  19
  117.         FixFormulaRow procedure  . . . . . . . . . . . . . . . . . . . . . .  20
  118.         FormatDialog function  . . . . . . . . . . . . . . . . . . . . . . .  20
  119.         FormatType type  . . . . . . . . . . . . . . . . . . . . . . . . . .  21
  120.         FormulaOps type  . . . . . . . . . . . . . . . . . . . . . . . . . .  21
  121.         FormulaStart function  . . . . . . . . . . . . . . . . . . . . . . .  22
  122.         GetColWidth function . . . . . . . . . . . . . . . . . . . . . . . .  22
  123.         GetColWidthFunc type . . . . . . . . . . . . . . . . . . . . . . . .  23
  124.         GetWidthDialog function  . . . . . . . . . . . . . . . . . . . . . .  23
  125.         GLResFile variable . . . . . . . . . . . . . . . . . . . . . . . . .  23
  126.         GLSortExit procedure . . . . . . . . . . . . . . . . . . . . . . . .  24
  127.         GLStringList variable  . . . . . . . . . . . . . . . . . . . . . . .  24
  128.         GoToDialog function  . . . . . . . . . . . . . . . . . . . . . . . .  24
  129.  
  130.                                          i
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.         hcXXXX constants . . . . . . . . . . . . . . . . . . . . . . . . . .  25
  140.         InitClipboard procedure  . . . . . . . . . . . . . . . . . . . . . .  27
  141.         InitCommandNumber constant . . . . . . . . . . . . . . . . . . . . .  27
  142.         InitHelpContextNumber constant . . . . . . . . . . . . . . . . . . .  27
  143.         InitObjectTypeID constant  . . . . . . . . . . . . . . . . . . . . .  28
  144.         InitStandardContextNumber constant . . . . . . . . . . . . . . . . .  28
  145.         InputLine function . . . . . . . . . . . . . . . . . . . . . . . . .  28
  146.         Justification type . . . . . . . . . . . . . . . . . . . . . . . . .  29
  147.         JustPart constant  . . . . . . . . . . . . . . . . . . . . . . . . .  29
  148.         Keyposition type . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  149.         KeyValue type  . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  150.         MessageLine variable . . . . . . . . . . . . . . . . . . . . . . . .  31
  151.         ModifiedXXXX constants . . . . . . . . . . . . . . . . . . . . . . .  31
  152.         NumberFormatShift constant . . . . . . . . . . . . . . . . . . . . .  31
  153.         OOGridFileHeader constant  . . . . . . . . . . . . . . . . . . . . .  32
  154.         PasteDialog function . . . . . . . . . . . . . . . . . . . . . . . .  32
  155.         PrintDialog function . . . . . . . . . . . . . . . . . . . . . . . .  32
  156.         PrinterConfigRec variable  . . . . . . . . . . . . . . . . . . . . .  33
  157.         PrintingDialog function  . . . . . . . . . . . . . . . . . . . . . .  33
  158.         PrintToDialog function . . . . . . . . . . . . . . . . . . . . . . .  33
  159.         RBlock constant  . . . . . . . . . . . . . . . . . . . . . . . . . .  34
  160.         RChangeHeader variable . . . . . . . . . . . . . . . . . . . . . . .  34
  161.         RChangeWidth variable  . . . . . . . . . . . . . . . . . . . . . . .  34
  162.         RCopyFormulas variable . . . . . . . . . . . . . . . . . . . . . . .  35
  163.         RedrawXXXX constants . . . . . . . . . . . . . . . . . . . . . . . .  35
  164.         RegisterGLCell procedure . . . . . . . . . . . . . . . . . . . . . .  35
  165.         RegisterGLSupprt procedure . . . . . . . . . . . . . . . . . . . . .  36
  166.         RegisterGLTSheetInputLine procedure  . . . . . . . . . . . . . . . .  36
  167.         RegisterGLViews procedure  . . . . . . . . . . . . . . . . . . . . .  36
  168.         RegisterSpreadSheet procedure  . . . . . . . . . . . . . . . . . . .  37
  169.         RemoveXXXX constants . . . . . . . . . . . . . . . . . . . . . . . .  37
  170.         RepeatFirstChar constant . . . . . . . . . . . . . . . . . . . . . .  37
  171.         RepeatTextChar constant  . . . . . . . . . . . . . . . . . . . . . .  38
  172.         RFormat variable . . . . . . . . . . . . . . . . . . . . . . . . . .  38
  173.         RFormulaCell constant  . . . . . . . . . . . . . . . . . . . . . . .  38
  174.         RGoToCell variable . . . . . . . . . . . . . . . . . . . . . . . . .  39
  175.         RLimScrollBar constant . . . . . . . . . . . . . . . . . . . . . . .  39
  176.         RPrint variable  . . . . . . . . . . . . . . . . . . . . . . . . . .  40
  177.         RRepeatCell constant . . . . . . . . . . . . . . . . . . . . . . . .  40
  178.         RSheetInputLine constant . . . . . . . . . . . . . . . . . . . . . .  41
  179.         RSortInfo variable . . . . . . . . . . . . . . . . . . . . . . . . .  41
  180.         RSpreadSheet constant  . . . . . . . . . . . . . . . . . . . . . . .  41
  181.         RTextCell constant . . . . . . . . . . . . . . . . . . . . . . . . .  42
  182.         RValueCell constant  . . . . . . . . . . . . . . . . . . . . . . . .  42
  183.         ScreenColRange type  . . . . . . . . . . . . . . . . . . . . . . . .  43
  184.         ScreenCols constant  . . . . . . . . . . . . . . . . . . . . . . . .  43
  185.         ScreenPos type . . . . . . . . . . . . . . . . . . . . . . . . . . .  44
  186.         ScreenRowRange type  . . . . . . . . . . . . . . . . . . . . . . . .  44
  187.         ScreenRows constant  . . . . . . . . . . . . . . . . . . . . . . . .  44
  188.         SortDialog function  . . . . . . . . . . . . . . . . . . . . . . . .  45
  189.         SortingDialog function . . . . . . . . . . . . . . . . . . . . . . .  45
  190.         SortTypes type . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
  191.         StandardSortObject variable  . . . . . . . . . . . . . . . . . . . .  45
  192.         stRXXXX constants  . . . . . . . . . . . . . . . . . . . . . . . . .  46
  193.         stXXXX constants . . . . . . . . . . . . . . . . . . . . . . . . . .  46
  194.         sXXXX constants  . . . . . . . . . . . . . . . . . . . . . . . . . .  47
  195.         TBlock object  . . . . . . . . . . . . . . . . . . . . . . . . . . .  48
  196.              Anchor field  . . . . . . . . . . . . . . . . . . . . . . . . .  48
  197.  
  198.                                          ii
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.              AnchorColShifted field  . . . . . . . . . . . . . . . . . . . .  49
  208.              AnchorRowShifted field  . . . . . . . . . . . . . . . . . . . .  49
  209.              CellInBlock function  . . . . . . . . . . . . . . . . . . . . .  50
  210.              ExtendTo funcition  . . . . . . . . . . . . . . . . . . . . . .  50
  211.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  50
  212.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  51
  213.              Start field . . . . . . . . . . . . . . . . . . . . . . . . . .  51
  214.              Stop field  . . . . . . . . . . . . . . . . . . . . . . . . . .  51
  215.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . .  52
  216.         TCell object . . . . . . . . . . . . . . . . . . . . . . . . . . . .  52
  217.              CellType function . . . . . . . . . . . . . . . . . . . . . . .  53
  218.              CopyString function . . . . . . . . . . . . . . . . . . . . . .  53
  219.              CurrValue function  . . . . . . . . . . . . . . . . . . . . . .  54
  220.              DisplayString function  . . . . . . . . . . . . . . . . . . . .  54
  221.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . .  55
  222.              EditString procedure  . . . . . . . . . . . . . . . . . . . . .  55
  223.              Format function . . . . . . . . . . . . . . . . . . . . . . . .  55
  224.              FormattedString function  . . . . . . . . . . . . . . . . . . .  56
  225.              HashError function  . . . . . . . . . . . . . . . . . . . . . .  57
  226.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  57
  227.              LegalValue function . . . . . . . . . . . . . . . . . . . . . .  58
  228.              Loc field . . . . . . . . . . . . . . . . . . . . . . . . . . .  58
  229.              Name function . . . . . . . . . . . . . . . . . . . . . . . . .  58
  230.              OverwriteStart function . . . . . . . . . . . . . . . . . . . .  59
  231.              Overwritten function  . . . . . . . . . . . . . . . . . . . . .  59
  232.              ShouldUpdate function . . . . . . . . . . . . . . . . . . . . .  60
  233.              Width function  . . . . . . . . . . . . . . . . . . . . . . . .  61
  234.         TCellHashTable object  . . . . . . . . . . . . . . . . . . . . . . .  61
  235.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . .  62
  236.              CreateItem procedure  . . . . . . . . . . . . . . . . . . . . .  62
  237.              CurrCell field  . . . . . . . . . . . . . . . . . . . . . . . .  62
  238.              CurrLoc field . . . . . . . . . . . . . . . . . . . . . . . . .  63
  239.              Delete procedure  . . . . . . . . . . . . . . . . . . . . . . .  63
  240.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . .  64
  241.              FirstItem function  . . . . . . . . . . . . . . . . . . . . . .  64
  242.              Found function  . . . . . . . . . . . . . . . . . . . . . . . .  64
  243.              HashValue function  . . . . . . . . . . . . . . . . . . . . . .  65
  244.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  65
  245.              ItemSize function . . . . . . . . . . . . . . . . . . . . . . .  66
  246.              Load procedure  . . . . . . . . . . . . . . . . . . . . . . . .  66
  247.              NextItem function . . . . . . . . . . . . . . . . . . . . . . .  67
  248.              Search function . . . . . . . . . . . . . . . . . . . . . . . .  67
  249.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . .  68
  250.         TEmptyCell object  . . . . . . . . . . . . . . . . . . . . . . . . .  68
  251.              CellType function . . . . . . . . . . . . . . . . . . . . . . .  69
  252.              CopyString function . . . . . . . . . . . . . . . . . . . . . .  69
  253.              CurrValue function  . . . . . . . . . . . . . . . . . . . . . .  69
  254.              DisplayString function  . . . . . . . . . . . . . . . . . . . .  70
  255.              EditString procedure  . . . . . . . . . . . . . . . . . . . . .  70
  256.              Format function . . . . . . . . . . . . . . . . . . . . . . . .  70
  257.              FormattedString function  . . . . . . . . . . . . . . . . . . .  71
  258.              HasError function . . . . . . . . . . . . . . . . . . . . . . .  71
  259.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  71
  260.              LegalValue function . . . . . . . . . . . . . . . . . . . . . .  71
  261.              Name function . . . . . . . . . . . . . . . . . . . . . . . . .  72
  262.              OverwriteStart function . . . . . . . . . . . . . . . . . . . .  72
  263.              Overwritten function  . . . . . . . . . . . . . . . . . . . . .  72
  264.              ShouldUpdate function . . . . . . . . . . . . . . . . . . . . .  72
  265.  
  266.                                         iii
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.              Width function  . . . . . . . . . . . . . . . . . . . . . . . .  73
  276.         TFormatHashTable object  . . . . . . . . . . . . . . . . . . . . . .  73
  277.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . .  74
  278.              CreateItem procedure  . . . . . . . . . . . . . . . . . . . . .  74
  279.              CurrFormat field  . . . . . . . . . . . . . . . . . . . . . . .  74
  280.              CurrStart field . . . . . . . . . . . . . . . . . . . . . . . .  75
  281.              CurrStop field  . . . . . . . . . . . . . . . . . . . . . . . .  75
  282.              Delete function . . . . . . . . . . . . . . . . . . . . . . . .  76
  283.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . .  76
  284.              Found function  . . . . . . . . . . . . . . . . . . . . . . . .  76
  285.              HashValue function  . . . . . . . . . . . . . . . . . . . . . .  77
  286.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  77
  287.              ItemSize function . . . . . . . . . . . . . . . . . . . . . . .  77
  288.              Load procedure  . . . . . . . . . . . . . . . . . . . . . . . .  77
  289.              Overwrite function  . . . . . . . . . . . . . . . . . . . . . .  78
  290.              Search function . . . . . . . . . . . . . . . . . . . . . . . .  78
  291.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . .  79
  292.         TFormulaCell object  . . . . . . . . . . . . . . . . . . . . . . . .  79
  293.              CellType function . . . . . . . . . . . . . . . . . . . . . . .  80
  294.              CopyString function . . . . . . . . . . . . . . . . . . . . . .  80
  295.              CurrValue function  . . . . . . . . . . . . . . . . . . . . . .  80
  296.              DisplayString function  . . . . . . . . . . . . . . . . . . . .  81
  297.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . .  81
  298.              EditString procedure  . . . . . . . . . . . . . . . . . . . . .  81
  299.              Error field . . . . . . . . . . . . . . . . . . . . . . . . . .  81
  300.              Format function . . . . . . . . . . . . . . . . . . . . . . . .  82
  301.              FormattedString function  . . . . . . . . . . . . . . . . . . .  82
  302.              Formula field . . . . . . . . . . . . . . . . . . . . . . . . .  82
  303.              GetFormula function . . . . . . . . . . . . . . . . . . . . . .  82
  304.              HasError function . . . . . . . . . . . . . . . . . . . . . . .  83
  305.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  83
  306.              LegalValue function . . . . . . . . . . . . . . . . . . . . . .  83
  307.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  83
  308.              Name function . . . . . . . . . . . . . . . . . . . . . . . . .  84
  309.              OverwriteStart function . . . . . . . . . . . . . . . . . . . .  84
  310.              Overwritten function  . . . . . . . . . . . . . . . . . . . . .  84
  311.              ShouldUpdate function . . . . . . . . . . . . . . . . . . . . .  84
  312.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . .  85
  313.              Value field . . . . . . . . . . . . . . . . . . . . . . . . . .  85
  314.              Width function  . . . . . . . . . . . . . . . . . . . . . . . .  85
  315.         THashTable object  . . . . . . . . . . . . . . . . . . . . . . . . .  85
  316.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . .  86
  317.         THeadersHashTable object . . . . . . . . . . . . . . . . . . . . . .  86
  318.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . .  87
  319.              CreateItem procedure  . . . . . . . . . . . . . . . . . . . . .  87
  320.              CurrCol field . . . . . . . . . . . . . . . . . . . . . . . . .  88
  321.              CurrName field  . . . . . . . . . . . . . . . . . . . . . . . .  88
  322.              Delete procedure  . . . . . . . . . . . . . . . . . . . . . . .  88
  323.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . .  89
  324.              Found function  . . . . . . . . . . . . . . . . . . . . . . . .  89
  325.              HashValue function  . . . . . . . . . . . . . . . . . . . . . .  89
  326.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  89
  327.              ItemSize function . . . . . . . . . . . . . . . . . . . . . . .  90
  328.              Load procedure  . . . . . . . . . . . . . . . . . . . . . . . .  90
  329.              Search function . . . . . . . . . . . . . . . . . . . . . . . .  90
  330.              SearchName function . . . . . . . . . . . . . . . . . . . . . .  91
  331.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . .  91
  332.         TLimScrollBar object . . . . . . . . . . . . . . . . . . . . . . . .  91
  333.  
  334.                                          iv
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.              Change function . . . . . . . . . . . . . . . . . . . . . . . .  92
  344.              DisplayLimit field  . . . . . . . . . . . . . . . . . . . . . .  92
  345.              Draw procedure  . . . . . . . . . . . . . . . . . . . . . . . .  93
  346.              HandleEvent procedure . . . . . . . . . . . . . . . . . . . . .  93
  347.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  94
  348.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  94
  349.              OldValue field  . . . . . . . . . . . . . . . . . . . . . . . .  95
  350.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . .  95
  351.         TMessageLine object  . . . . . . . . . . . . . . . . . . . . . . . .  95
  352.              Draw procedure  . . . . . . . . . . . . . . . . . . . . . . . .  96
  353.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . .  96
  354.              StatusMessage field . . . . . . . . . . . . . . . . . . . . . .  96
  355.         ToggleClipBoardOff procedure . . . . . . . . . . . . . . . . . . . .  97
  356.         ToggleClipBoardOn procedure  . . . . . . . . . . . . . . . . . . . .  97
  357.         TOverwriteHashTable object . . . . . . . . . . . . . . . . . . . . .  98
  358.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . .  98
  359.              Change function . . . . . . . . . . . . . . . . . . . . . . . .  99
  360.              CreateItem procedure  . . . . . . . . . . . . . . . . . . . . . 100
  361.              CurrCell field  . . . . . . . . . . . . . . . . . . . . . . . . 100
  362.              CurrPos field . . . . . . . . . . . . . . . . . . . . . . . . . 100
  363.              Delete procedure  . . . . . . . . . . . . . . . . . . . . . . . 101
  364.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . . 102
  365.              EndCol field  . . . . . . . . . . . . . . . . . . . . . . . . . 102
  366.              Found function  . . . . . . . . . . . . . . . . . . . . . . . . 103
  367.              HashValue function  . . . . . . . . . . . . . . . . . . . . . . 103
  368.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 103
  369.              ItemSize function . . . . . . . . . . . . . . . . . . . . . . . 103
  370.              Search function . . . . . . . . . . . . . . . . . . . . . . . . 104
  371.         TRepeatCell object . . . . . . . . . . . . . . . . . . . . . . . . . 104
  372.              CellType function . . . . . . . . . . . . . . . . . . . . . . . 105
  373.              CopyString function . . . . . . . . . . . . . . . . . . . . . . 105
  374.              CurrValue function  . . . . . . . . . . . . . . . . . . . . . . 105
  375.              DisplayString function  . . . . . . . . . . . . . . . . . . . . 106
  376.              EditString procedure  . . . . . . . . . . . . . . . . . . . . . 106
  377.              Format function . . . . . . . . . . . . . . . . . . . . . . . . 106
  378.              FormattedString function  . . . . . . . . . . . . . . . . . . . 106
  379.              HasError function . . . . . . . . . . . . . . . . . . . . . . . 106
  380.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 107
  381.              LegalValue function . . . . . . . . . . . . . . . . . . . . . . 107
  382.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 107
  383.              Name function . . . . . . . . . . . . . . . . . . . . . . . . . 107
  384.              OverwriteStart function . . . . . . . . . . . . . . . . . . . . 108
  385.              Overwritten function  . . . . . . . . . . . . . . . . . . . . . 108
  386.              RepeatChar field  . . . . . . . . . . . . . . . . . . . . . . . 108
  387.              ShouldUpdate function . . . . . . . . . . . . . . . . . . . . . 108
  388.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . . 109
  389.              Width function  . . . . . . . . . . . . . . . . . . . . . . . . 109
  390.         TScreenArea object . . . . . . . . . . . . . . . . . . . . . . . . . 109
  391.              Attrib field  . . . . . . . . . . . . . . . . . . . . . . . . . 110
  392.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 110
  393.              LowerRight field  . . . . . . . . . . . . . . . . . . . . . . . 110
  394.              PointInArea function  . . . . . . . . . . . . . . . . . . . . . 111
  395.              UpperLeft field . . . . . . . . . . . . . . . . . . . . . . . . 111
  396.         TSheetInputLine object . . . . . . . . . . . . . . . . . . . . . . . 111
  397.              EndModal procedure  . . . . . . . . . . . . . . . . . . . . . . 112
  398.              EndState field  . . . . . . . . . . . . . . . . . . . . . . . . 112
  399.              Execute function  . . . . . . . . . . . . . . . . . . . . . . . 113
  400.              GetPalette function . . . . . . . . . . . . . . . . . . . . . . 113
  401.  
  402.                                          v
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.              HandleEvent procedure . . . . . . . . . . . . . . . . . . . . . 113
  412.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 114
  413.              SetState procedure  . . . . . . . . . . . . . . . . . . . . . . 114
  414.         TSortObject object . . . . . . . . . . . . . . . . . . . . . . . . . 115
  415.              CurrentKeyPosition function . . . . . . . . . . . . . . . . . . 115
  416.              CurrentRowPosition function . . . . . . . . . . . . . . . . . . 116
  417.              CurrKey field . . . . . . . . . . . . . . . . . . . . . . . . . 117
  418.              FillKeyRec procedure  . . . . . . . . . . . . . . . . . . . . . 117
  419.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 117
  420.              KeyCols field . . . . . . . . . . . . . . . . . . . . . . . . . 118
  421.              KeySortOrder field  . . . . . . . . . . . . . . . . . . . . . . 118
  422.              LastKey field . . . . . . . . . . . . . . . . . . . . . . . . . 118
  423.              PivotFirstKey field . . . . . . . . . . . . . . . . . . . . . . 119
  424.              PivotSecondKey field  . . . . . . . . . . . . . . . . . . . . . 119
  425.              PivotThirdKey field . . . . . . . . . . . . . . . . . . . . . . 119
  426.              QuickSort procedure . . . . . . . . . . . . . . . . . . . . . . 120
  427.              SetKeyArray function  . . . . . . . . . . . . . . . . . . . . . 120
  428.              SetPivot procedure  . . . . . . . . . . . . . . . . . . . . . . 121
  429.              Sort procedure  . . . . . . . . . . . . . . . . . . . . . . . . 121
  430.              SortBlock field . . . . . . . . . . . . . . . . . . . . . . . . 122
  431.              SourceCellHash field  . . . . . . . . . . . . . . . . . . . . . 122
  432.              SplitSortBlock procedure  . . . . . . . . . . . . . . . . . . . 122
  433.              SwapRows procedure  . . . . . . . . . . . . . . . . . . . . . . 123
  434.         TSpreadSheet object  . . . . . . . . . . . . . . . . . . . . . . . . 123
  435.              AddCell function  . . . . . . . . . . . . . . . . . . . . . . . 127
  436.              AutoCalc field  . . . . . . . . . . . . . . . . . . . . . . . . 127
  437.              BlankArea field . . . . . . . . . . . . . . . . . . . . . . . . 128
  438.              BlockOn field . . . . . . . . . . . . . . . . . . . . . . . . . 128
  439.              CellHash field  . . . . . . . . . . . . . . . . . . . . . . . . 128
  440.              CellHashStart function  . . . . . . . . . . . . . . . . . . . . 129
  441.              CellsProtected function . . . . . . . . . . . . . . . . . . . . 129
  442.              CellToFString function  . . . . . . . . . . . . . . . . . . . . 129
  443.              ChangeBounds procedure  . . . . . . . . . . . . . . . . . . . . 130
  444.              ChangeColHeaders procedure  . . . . . . . . . . . . . . . . . . 130
  445.              ChangeColWidth procedure  . . . . . . . . . . . . . . . . . . . 131
  446.              CheckForDragging procedure  . . . . . . . . . . . . . . . . . . 131
  447.              ClearCurrBlock procedure  . . . . . . . . . . . . . . . . . . . 131
  448.              ClearScreenArea procedure . . . . . . . . . . . . . . . . . . . 132
  449.              ColArea field . . . . . . . . . . . . . . . . . . . . . . . . . 132
  450.              ColHeadersHash field  . . . . . . . . . . . . . . . . . . . . . 132
  451.              ColHeadersHashStart function  . . . . . . . . . . . . . . . . . 133
  452.              ColStart field  . . . . . . . . . . . . . . . . . . . . . . . . 133
  453.              ColToX function . . . . . . . . . . . . . . . . . . . . . . . . 133
  454.              ColumnToString function . . . . . . . . . . . . . . . . . . . . 134
  455.              ColWidth function . . . . . . . . . . . . . . . . . . . . . . . 134
  456.              ContentsArea field  . . . . . . . . . . . . . . . . . . . . . . 134
  457.              CopyCellBlock procedure . . . . . . . . . . . . . . . . . . . . 135
  458.              CurrBlock field . . . . . . . . . . . . . . . . . . . . . . . . 135
  459.              CurrPos field . . . . . . . . . . . . . . . . . . . . . . . . . 135
  460.              DataArea field  . . . . . . . . . . . . . . . . . . . . . . . . 136
  461.              DefaultColWidth field . . . . . . . . . . . . . . . . . . . . . 136
  462.              DefaultCurrency field . . . . . . . . . . . . . . . . . . . . . 136
  463.              DefaultDecimalPlaces field  . . . . . . . . . . . . . . . . . . 137
  464.              DeleteBlock procedure . . . . . . . . . . . . . . . . . . . . . 137
  465.              DeleteCell procedure  . . . . . . . . . . . . . . . . . . . . . 137
  466.              DeleteColFromHash procedure . . . . . . . . . . . . . . . . . . 138
  467.              DeleteColHeaders procedure  . . . . . . . . . . . . . . . . . . 138
  468.              DeleteColumns procedure . . . . . . . . . . . . . . . . . . . . 139
  469.  
  470.                                          vi
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.              DeleteRowFromHash procedure . . . . . . . . . . . . . . . . . . 139
  480.              DeleteRows procedure  . . . . . . . . . . . . . . . . . . . . . 140
  481.              DisplayAllCells procedure . . . . . . . . . . . . . . . . . . . 140
  482.              DisplayArea field . . . . . . . . . . . . . . . . . . . . . . . 140
  483.              DisplayBlankArea procedure  . . . . . . . . . . . . . . . . . . 141
  484.              DisplayBlock procedure  . . . . . . . . . . . . . . . . . . . . 141
  485.              DisplayBlockDiff procedure  . . . . . . . . . . . . . . . . . . 142
  486.              DisplayCell procedure . . . . . . . . . . . . . . . . . . . . . 142
  487.              DisplayCellBlock procedure  . . . . . . . . . . . . . . . . . . 142
  488.              DisplayCellData procedure . . . . . . . . . . . . . . . . . . . 143
  489.              DisplayCols procedure . . . . . . . . . . . . . . . . . . . . . 143
  490.              DisplayFormulas field . . . . . . . . . . . . . . . . . . . . . 144
  491.              DisplayHeaders field  . . . . . . . . . . . . . . . . . . . . . 144
  492.              DisplayInfo procedure . . . . . . . . . . . . . . . . . . . . . 144
  493.              DisplayRows procedure . . . . . . . . . . . . . . . . . . . . . 145
  494.              DoAfterEndInput procedure . . . . . . . . . . . . . . . . . . . 145
  495.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . . 145
  496.              DoneHashTables procedure  . . . . . . . . . . . . . . . . . . . 146
  497.              DragCursorWithMouse procedure . . . . . . . . . . . . . . . . . 146
  498.              Draw procedure  . . . . . . . . . . . . . . . . . . . . . . . . 146
  499.              EmptyRowsAtBottom field . . . . . . . . . . . . . . . . . . . . 147
  500.              EmptyRowsAtTop field  . . . . . . . . . . . . . . . . . . . . . 147
  501.              EraseCellBlock procedure  . . . . . . . . . . . . . . . . . . . 148
  502.              ExtendCurrBlock procedure . . . . . . . . . . . . . . . . . . . 148
  503.              FindLastPos procedure . . . . . . . . . . . . . . . . . . . . . 148
  504.              FindScreenColStart procedure  . . . . . . . . . . . . . . . . . 149
  505.              FindScreenColStop procedure . . . . . . . . . . . . . . . . . . 149
  506.              FindScreenRowStop procedure . . . . . . . . . . . . . . . . . . 150
  507.              FindScreenRowStart procedure  . . . . . . . . . . . . . . . . . 150
  508.              FixBlockOverWrite procedure . . . . . . . . . . . . . . . . . . 150
  509.              FixOverWrite function . . . . . . . . . . . . . . . . . . . . . 151
  510.              FormatDefault procedure . . . . . . . . . . . . . . . . . . . . 151
  511.              FormulaHash field . . . . . . . . . . . . . . . . . . . . . . . 152
  512.              FStringSituationColor function  . . . . . . . . . . . . . . . . 152
  513.              GetFormat procedure . . . . . . . . . . . . . . . . . . . . . . 152
  514.              GetPalette function . . . . . . . . . . . . . . . . . . . . . . 153
  515.              GoToCell procedure  . . . . . . . . . . . . . . . . . . . . . . 153
  516.              GoToEnd field . . . . . . . . . . . . . . . . . . . . . . . . . 153
  517.              HandleEvent procedure . . . . . . . . . . . . . . . . . . . . . 154
  518.              HandleInput procedure . . . . . . . . . . . . . . . . . . . . . 154
  519.              InfoArea field  . . . . . . . . . . . . . . . . . . . . . . . . 155
  520.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 155
  521.              InitCurrPos procedure . . . . . . . . . . . . . . . . . . . . . 156
  522.              InsertColumns procedure . . . . . . . . . . . . . . . . . . . . 157
  523.              InsertRows procedure  . . . . . . . . . . . . . . . . . . . . . 157
  524.              InsertRowToHash procedure . . . . . . . . . . . . . . . . . . . 157
  525.              KeyPressed field  . . . . . . . . . . . . . . . . . . . . . . . 158
  526.              LastPos field . . . . . . . . . . . . . . . . . . . . . . . . . 158
  527.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 159
  528.              LoadDelimited procedure . . . . . . . . . . . . . . . . . . . . 159
  529.              LoadHashTables procedure  . . . . . . . . . . . . . . . . . . . 159
  530.              LoadTablesFromTempFile procedure  . . . . . . . . . . . . . . . 160
  531.              LocateCursorWithMouse procedure . . . . . . . . . . . . . . . . 161
  532.              MaxCols field . . . . . . . . . . . . . . . . . . . . . . . . . 161
  533.              MaxColWidth field . . . . . . . . . . . . . . . . . . . . . . . 161
  534.              MaxDecimalPlaces field  . . . . . . . . . . . . . . . . . . . . 162
  535.              MaxRows field . . . . . . . . . . . . . . . . . . . . . . . . . 162
  536.              MaxScreenCols field . . . . . . . . . . . . . . . . . . . . . . 162
  537.  
  538.                                         vii
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.              Modified field  . . . . . . . . . . . . . . . . . . . . . . . . 163
  548.              MoveCell procedure  . . . . . . . . . . . . . . . . . . . . . . 163
  549.              MoveCellBlock procedure . . . . . . . . . . . . . . . . . . . . 163
  550.              MoveDown procedure  . . . . . . . . . . . . . . . . . . . . . . 164
  551.              MoveHome procedure  . . . . . . . . . . . . . . . . . . . . . . 164
  552.              MoveLeft procedure  . . . . . . . . . . . . . . . . . . . . . . 164
  553.              MovePgDown procedure  . . . . . . . . . . . . . . . . . . . . . 165
  554.              MovePgLeft procedure  . . . . . . . . . . . . . . . . . . . . . 165
  555.              MovePgRight procedure . . . . . . . . . . . . . . . . . . . . . 165
  556.              MovePgUp procedure  . . . . . . . . . . . . . . . . . . . . . . 165
  557.              MoveRight procedure . . . . . . . . . . . . . . . . . . . . . . 166
  558.              MoveUp procedure  . . . . . . . . . . . . . . . . . . . . . . . 166
  559.              NoBlankArea field . . . . . . . . . . . . . . . . . . . . . . . 166
  560.              Number field  . . . . . . . . . . . . . . . . . . . . . . . . . 167
  561.              OldCurrPos field  . . . . . . . . . . . . . . . . . . . . . . . 167
  562.              OverwriteHash field . . . . . . . . . . . . . . . . . . . . . . 167
  563.              OverwriteHashStart function . . . . . . . . . . . . . . . . . . 168
  564.              Parser function . . . . . . . . . . . . . . . . . . . . . . . . 168
  565.              PasteBlock procedure  . . . . . . . . . . . . . . . . . . . . . 168
  566.              PasteCellBlock procedure  . . . . . . . . . . . . . . . . . . . 169
  567.              Print procedure . . . . . . . . . . . . . . . . . . . . . . . . 169
  568.              Recalc procedure  . . . . . . . . . . . . . . . . . . . . . . . 169
  569.              RowArea field . . . . . . . . . . . . . . . . . . . . . . . . . 170
  570.              RowNumberSpace field  . . . . . . . . . . . . . . . . . . . . . 170
  571.              RowToY function . . . . . . . . . . . . . . . . . . . . . . . . 171
  572.              SameCellPos function  . . . . . . . . . . . . . . . . . . . . . 171
  573.              ScrollDraw procedure  . . . . . . . . . . . . . . . . . . . . . 171
  574.              SelectColumn function . . . . . . . . . . . . . . . . . . . . . 172
  575.              SetAreas procedure  . . . . . . . . . . . . . . . . . . . . . . 172
  576.              SetBlankArea procedure  . . . . . . . . . . . . . . . . . . . . 172
  577.              SetChanged procedure  . . . . . . . . . . . . . . . . . . . . . 173
  578.              SetLimit procedure  . . . . . . . . . . . . . . . . . . . . . . 173
  579.              SetLocked procedure . . . . . . . . . . . . . . . . . . . . . . 174
  580.              SetNameWithMouse procedure  . . . . . . . . . . . . . . . . . . 174
  581.              SetNumber procedure . . . . . . . . . . . . . . . . . . . . . . 174
  582.              SetProtection procedure . . . . . . . . . . . . . . . . . . . . 175
  583.              SetScreenColStop procedure  . . . . . . . . . . . . . . . . . . 175
  584.              SetScreenColStart procedure . . . . . . . . . . . . . . . . . . 176
  585.              SetScreenRowStop procedure  . . . . . . . . . . . . . . . . . . 176
  586.              SetScreenRowStart procedure . . . . . . . . . . . . . . . . . . 176
  587.              SetState procedure  . . . . . . . . . . . . . . . . . . . . . . 177
  588.              SetUnlocked procedure . . . . . . . . . . . . . . . . . . . . . 177
  589.              SheetProtected field  . . . . . . . . . . . . . . . . . . . . . 178
  590.              SortData procedure  . . . . . . . . . . . . . . . . . . . . . . 178
  591.              SortObject function . . . . . . . . . . . . . . . . . . . . . . 178
  592.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . . 179
  593.              StoreHashTables procedure . . . . . . . . . . . . . . . . . . . 179
  594.              StoreTablesToTempFile procedure . . . . . . . . . . . . . . . . 179
  595.              ToggleAutoCalc procedure  . . . . . . . . . . . . . . . . . . . 180
  596.              ToggleDisplayHeaders procedure  . . . . . . . . . . . . . . . . 180
  597.              ToggleEnd procedure . . . . . . . . . . . . . . . . . . . . . . 180
  598.              ToggleFormulaDisplay procedure  . . . . . . . . . . . . . . . . 181
  599.              ToogleBlockOn procedure . . . . . . . . . . . . . . . . . . . . 181
  600.              TotalRows field . . . . . . . . . . . . . . . . . . . . . . . . 181
  601.              TrackCursor function  . . . . . . . . . . . . . . . . . . . . . 181
  602.              UnlockedHash field  . . . . . . . . . . . . . . . . . . . . . . 182
  603.              UpdateScreenBlockDisplay procedure  . . . . . . . . . . . . . . 182
  604.              WidthHash field . . . . . . . . . . . . . . . . . . . . . . . . 182
  605.  
  606.                                         viii
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.              WidthHashStart function . . . . . . . . . . . . . . . . . . . . 183
  616.              XToCol fuction  . . . . . . . . . . . . . . . . . . . . . . . . 183
  617.              YToRow function . . . . . . . . . . . . . . . . . . . . . . . . 183
  618.         TSpreadSheetWindow object  . . . . . . . . . . . . . . . . . . . . . 184
  619.              GetPalette function . . . . . . . . . . . . . . . . . . . . . . 184
  620.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 184
  621.              SizeLimits procedure  . . . . . . . . . . . . . . . . . . . . . 185
  622.              StandardScrollBar function  . . . . . . . . . . . . . . . . . . 185
  623.         TTextCell object . . . . . . . . . . . . . . . . . . . . . . . . . . 186
  624.              CellType function . . . . . . . . . . . . . . . . . . . . . . . 187
  625.              CopyString function . . . . . . . . . . . . . . . . . . . . . . 187
  626.              CurrValue function  . . . . . . . . . . . . . . . . . . . . . . 187
  627.              DisplayString function  . . . . . . . . . . . . . . . . . . . . 187
  628.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . . 187
  629.              EditString procedure  . . . . . . . . . . . . . . . . . . . . . 188
  630.              Format function . . . . . . . . . . . . . . . . . . . . . . . . 188
  631.              FormattedString function  . . . . . . . . . . . . . . . . . . . 188
  632.              HasError function . . . . . . . . . . . . . . . . . . . . . . . 188
  633.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 188
  634.              LegalValue function . . . . . . . . . . . . . . . . . . . . . . 189
  635.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 189
  636.              Name function . . . . . . . . . . . . . . . . . . . . . . . . . 189
  637.              OverwriteStart function . . . . . . . . . . . . . . . . . . . . 189
  638.              Overwritten function  . . . . . . . . . . . . . . . . . . . . . 190
  639.              ShouldUpdate function . . . . . . . . . . . . . . . . . . . . . 190
  640.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . . 190
  641.              Txt field . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
  642.              Width function  . . . . . . . . . . . . . . . . . . . . . . . . 191
  643.         TUnlockedHashTable object  . . . . . . . . . . . . . . . . . . . . . 191
  644.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . . 192
  645.              CreateItem procedure  . . . . . . . . . . . . . . . . . . . . . 192
  646.              CurrStart field . . . . . . . . . . . . . . . . . . . . . . . . 192
  647.              CurrStop field  . . . . . . . . . . . . . . . . . . . . . . . . 193
  648.              Delete procedure  . . . . . . . . . . . . . . . . . . . . . . . 193
  649.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . . 193
  650.              Found function  . . . . . . . . . . . . . . . . . . . . . . . . 194
  651.              HashValue function  . . . . . . . . . . . . . . . . . . . . . . 194
  652.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 194
  653.              ItemSize function . . . . . . . . . . . . . . . . . . . . . . . 194
  654.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 194
  655.              Overwrite function  . . . . . . . . . . . . . . . . . . . . . . 195
  656.              Search function . . . . . . . . . . . . . . . . . . . . . . . . 195
  657.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . . 195
  658.         TValueCell object  . . . . . . . . . . . . . . . . . . . . . . . . . 196
  659.              CellType function . . . . . . . . . . . . . . . . . . . . . . . 197
  660.              CopyString function . . . . . . . . . . . . . . . . . . . . . . 197
  661.              CurrValue function  . . . . . . . . . . . . . . . . . . . . . . 197
  662.              DisplayString function  . . . . . . . . . . . . . . . . . . . . 197
  663.              EditString procedure  . . . . . . . . . . . . . . . . . . . . . 197
  664.              Error field . . . . . . . . . . . . . . . . . . . . . . . . . . 198
  665.              Format function . . . . . . . . . . . . . . . . . . . . . . . . 198
  666.              FormattedString function  . . . . . . . . . . . . . . . . . . . 198
  667.              HasError function . . . . . . . . . . . . . . . . . . . . . . . 198
  668.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 198
  669.              LegalValue function . . . . . . . . . . . . . . . . . . . . . . 199
  670.              Load CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 199
  671.              Name function . . . . . . . . . . . . . . . . . . . . . . . . . 199
  672.              OverwriteStart function . . . . . . . . . . . . . . . . . . . . 200
  673.  
  674.                                          ix
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.              Overwritten function  . . . . . . . . . . . . . . . . . . . . . 200
  684.              ShouldUpdate function . . . . . . . . . . . . . . . . . . . . . 200
  685.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . . 200
  686.              Value field . . . . . . . . . . . . . . . . . . . . . . . . . . 200
  687.              Width function  . . . . . . . . . . . . . . . . . . . . . . . . 201
  688.         TWidthHashTable object . . . . . . . . . . . . . . . . . . . . . . . 201
  689.              Add function  . . . . . . . . . . . . . . . . . . . . . . . . . 202
  690.              CreateItem function . . . . . . . . . . . . . . . . . . . . . . 202
  691.              CurrCol field . . . . . . . . . . . . . . . . . . . . . . . . . 202
  692.              CurrWidth field . . . . . . . . . . . . . . . . . . . . . . . . 203
  693.              DefaultColWidth field . . . . . . . . . . . . . . . . . . . . . 203
  694.              Delete procedure  . . . . . . . . . . . . . . . . . . . . . . . 203
  695.              Done DESTRUCTOR . . . . . . . . . . . . . . . . . . . . . . . . 204
  696.              Found function  . . . . . . . . . . . . . . . . . . . . . . . . 204
  697.              GetDefaultColWidth function . . . . . . . . . . . . . . . . . . 204
  698.              HashValue function  . . . . . . . . . . . . . . . . . . . . . . 205
  699.              Init CONSTRUCTOR  . . . . . . . . . . . . . . . . . . . . . . . 205
  700.              ItemSize function . . . . . . . . . . . . . . . . . . . . . . . 205
  701.              Load procedure  . . . . . . . . . . . . . . . . . . . . . . . . 205
  702.              Search function . . . . . . . . . . . . . . . . . . . . . . . . 206
  703.              Store procedure . . . . . . . . . . . . . . . . . . . . . . . . 206
  704.         UpdatingTablesDialog function  . . . . . . . . . . . . . . . . . . . 207
  705.  
  706.    INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.                                          x
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.    ABOUT THE DOCUMENTATION
  752.  
  753.    This documentation provides reference information about all the units and
  754.    source code in OOGrid Library(TM) v1.0.  It is intended to be used as a
  755.    reference - not as a tutorial.  If you are new to OOGrid Library(TM) v1.0,
  756.    read the README.TXT file first; it provides general information about this
  757.    library and how to use it in your applications, which you can complement by
  758.    studying the source code of the demo programs.
  759.  
  760.    The documentation is organized in two sections:  UNITS DESCRIPTION and
  761.    IDENTIFIERS DESCRIPTION.  In the units description section, there is a short
  762.    description of almost eVery unit in this library (the units GLPARSER.PAS,
  763.    GLLSTR.PAS, TCHASH.PAS and TCUTIL.PAS are not documented).  In the
  764.    identifiers description section, there is a description -- in alphabetical
  765.    order -- of all objects, variables, procedures, functions, types and
  766.    constants declared in those units.  Each identifier description has the
  767.    identifier declaration, the unit in which it is declared, its function, its
  768.    parameters' description (if any) and important remarks about the identifier
  769.    (if any).
  770.  
  771.    If you want to get a general overview of the objects in this library, read
  772.    the description of each of the units in this library; then, try browsing the
  773.    objects' descriptions and its attributes and methods's functions.
  774.  
  775.    However, the documentation becomes more useful when you actually begin
  776.    working with the objects.  If you need to know what a method does, why a
  777.    variable was declared, or what is the purpose of an object's attribute,
  778.    simply read its description in this documentation.  The description should
  779.    help you understand the function of an identifier and its relation with other
  780.    identifiers.
  781.  
  782.    HOW TO CONTACT THE AUTHOR
  783.  
  784.    If you don't find the information you need in this documentation, or if you
  785.    have any comments or suggestions about OOGrid Library(TM) v1.0 or its
  786.    documentation, please feel free to contact the author at any of the addresses
  787.    listed below:
  788.  
  789.     E-MAIL:
  790.          INTERNET:          mongev@cariari.ucr.ac.cr
  791.          CLEVELAND FREENET: fh441@freenet.cleveland.edu
  792.  
  793.     MAIL:
  794.          Arturo J. Monge
  795.          SJO 1684; POB 025216
  796.          Miami, FL 33102-5216
  797.  
  798.    Sending correspondence via electronic mail is strongly preferred.
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.                                          1
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.    I. UNITS DESCRIPTION
  820.  
  821.    ************************************************************************
  822.                                   GLCELL.PAS Unit
  823.    ************************************************************************
  824.  
  825.    This unit implements the different types of cells and hash tables used by
  826.    TSpreadsheet.  The hash tables are the objects used to store information in
  827.    OOGrid Library(TM) v1.0 and are descendants of Borland's HashTable object. 
  828.    For more information, see TCHASH.PAS (in Turbo Pascal 6.0).
  829.  
  830.  
  831.    Basically, this unit is the same as Borland's TCCELL.PAS but with a larga
  832.    amount of modifications which were necessary for adapting the unit's objects
  833.    for use by TSpreadSheet.
  834.  
  835.    The hash tables implemented in this unit are:
  836.  
  837.         a) THashTable : A HashTable's descendant that checks the value of the
  838.         LowMemory function before adding a cell to the hash table.  All hash
  839.         tables in this unit are descendants of THashTable.
  840.  
  841.         b) TCellHashTable: Stores the cells in a spreadsheet.
  842.  
  843.         c) TWidthHashTable: Stores column widths that are different from the
  844.         default column width.
  845.  
  846.         d) TFormatHashTable: Stores formatting information for blocks of cells
  847.         in a spreadsheet.
  848.  
  849.         e) TOverWriteHashTable: Stores information about empty cells that are
  850.         overwritten by the information in other cells.
  851.  
  852.         f) TColumnHeadersHashTable: Stores custom assigned column headers.
  853.  
  854.         g) TUnlockedCellHashTable: Stores the location of block of cells that
  855.         are marked as 'unlocked' (see TSpreadSheet.SetUnlocked and
  856.         TSpreadSheet.SetLocked )
  857.  
  858.    The cell objects implemented in this unit are:
  859.  
  860.         a) TCell : This is an abstract cell object.  All cell objects are
  861.         descendants of TCell.
  862.  
  863.         b) TEmptyCell : Cell object used when working with empty cells in the
  864.         spreadsheet.  Only one instance of TEmptyCell is constructed since all
  865.         empty cells behave exactly the same way.
  866.  
  867.         b) TTextCell : Cell object that stores a string.
  868.  
  869.         c) TValueCell : Cell object that stores a value.
  870.  
  871.         d) TFormulaCell : Cell object that stores a formula and its result.
  872.  
  873.         e) TRepeatCell : Cell object that stores a character;  this character
  874.         will be repeated when the cell is displayed.
  875.  
  876.  
  877.  
  878.                                          2
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.    GLCell also implements several functions for handling formulas and declares
  888.    additional support variables, constants and types (used mostly by objects in
  889.    this unit).
  890.  
  891.    ************************************************************************
  892.                                  GLEQUATES.PAS Unit
  893.    ************************************************************************
  894.  
  895.    The GLEQUATES unit defines all command and help context constants that are
  896.    used by the TSpreadSheet object (the main object) and its resources.  The
  897.    help context constants are only used when creating the resource file used by
  898.    TSpreadSheet; the command constants are used too when creating the resource
  899.    file, but are also used by TSpreadSheet's HandleEvent method.
  900.  
  901.    The constants in the GLEQUATES units are organized in four groups:
  902.  
  903.         a) Standard Help Contexts: these are help context constants used by
  904.         standard buttons in all dialogs in OOGrid Library(TM) v1.0.  These
  905.         standard buttons include 'YES', 'NO', 'OK', 'CANCEL', which are assigned
  906.         the help context values hcYes, hcNo, hcOk and hcCancel, respectively.
  907.  
  908.         b) Help contexts: these are help context constants used by all dialogs
  909.         and views in OOGrid Library(TM) v1.0.  Some of these constants are
  910.         organized in groups of two or three to indicate that they are part of a
  911.         cluster and therefore, all constants in the group must have consecutive
  912.         values.
  913.  
  914.         c) Commands: these are command constants used by all dialogs in OOGrid
  915.         Library(TM) v1.0;  they are also used by TSpreadSheet's HandleEvent
  916.         method.
  917.  
  918.         d) Object Type ID's: these are the object type ID's used in the stream
  919.         registration records in OOGrid Library(TM) v1.0.
  920.  
  921.    There are four particular constants that let you easily change the values of
  922.    all the constants in the GLEQUATES units:
  923.  
  924.         a) InitStandardContextNumber: indicates the starting number of the
  925.         sequence of values that will be assigned to the standard help contexts.
  926.  
  927.         b) InitHelpContextNumber: indicates the starting number of the sequence
  928.         of values that will be assigned to the help contexts used by the dialogs
  929.         and views in OOGrid Library(TM) v1.0.
  930.  
  931.         c) InitCommandNumber:  indicates the starting number of the sequence of
  932.         values that will be assigned to the commands used by the dialogs in
  933.         OOGrid Library(TM) v1.0 and by the TSpreadSheet object.
  934.  
  935.         d) InitObjectTypeID: indicates the starting number of the sequence of
  936.         values that will be assigned to the list of object types ID's (used in
  937.         the stream registration records in OOGrid Library(TM) v1.0). 
  938.  
  939.    ************************************************************************
  940.                                   GLSORT.PAS Unit
  941.    ************************************************************************
  942.  
  943.    The GLSORT unit implements an object (TSortObject) that can sort the rows of
  944.    a block of cells in a THashTable object (see GLCELL.PAS), using three
  945.  
  946.                                          3
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.    different sort keys in either ascending or descending order.  The list is
  956.    sorted using the QuickSort algorithm.
  957.  
  958.    The unit also declares the StandardSortObject variable.  This variable is
  959.    initialized with a pointer to an instance of TSortObject.  When TSpreadSheet
  960.    needs a service from TSortObject, it calls its SortObject function, which
  961.    returns the value stored in the StandardSortObject variable.  If you need to
  962.    use a different sort object, simply override TSpreadSheet's SortObject
  963.    function to return a pointer to the new object (the new object must be a
  964.    TSortObject's descendant).
  965.  
  966.  
  967.    ************************************************************************
  968.                                  GLSUPPRT.PAS Unit
  969.    ************************************************************************
  970.  
  971.    The GLSUPPRT unit declares additional constants, variables, types and
  972.    objects.
  973.  
  974.    It implements the resource support needed by TSpreadSheet, by declaring the
  975.    GLResFile and GLStringList variables (which indicate TSpreadSheet where to
  976.    find its resources) and the string list index constants.  It declares
  977.    additional stream status constants, default constants that can be used when
  978.    constructing a new instance of TSpreadSheet, and a PrinterConfigRec variable
  979.    -- initialized with printer default values also declared in this unit -- that
  980.    is used by TSpreadSheet's Print method.
  981.  
  982.    The CellPos record, used throughout OOGrid Library(TM) v1.0, is also declared
  983.    in this unit, along with the TBlock and TScreenArea objects, and some other
  984.    screen related constants, records and types.
  985.  
  986.  
  987.    ************************************************************************
  988.                                  GLTSHEET.PAS Unit
  989.    ************************************************************************
  990.  
  991.    This is the main unit in OOGrid Library(TM) v1.0.  The GLTSHEET unit
  992.    implements the TSpreadSheet object.
  993.  
  994.    To add spreadsheet capabilities to your applications, you will need to
  995.    construct an instance of TSpreadSheet or a descendant.
  996.  
  997.  
  998.    ************************************************************************
  999.                                  GLTVR_US.PAS Unit
  1000.    ************************************************************************
  1001.  
  1002.    The GLTVR_US unit exports to functions that are are used to create
  1003.    TSpreadsheet's resources: CreateOOGLDialogs and CreateOOGLStrings.
  1004.  
  1005.  
  1006.    It implements several functions that create the dialogs, which are called by
  1007.    the CreateOOGLDialogs function.  If you need to change any of the dialogs,
  1008.    you will need to modify one or more of this functions.  If you need to change
  1009.    the text in the spreadsheet, you will need to modify the CreateOOGLStrings
  1010.    function.  
  1011.  
  1012.  
  1013.  
  1014.                                          4
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.    ************************************************************************
  1024.                                   GLVIEWS.PAS Unit
  1025.    ************************************************************************
  1026.  
  1027.    The GLVIEWS unit implements three TView's descendants and defines the record
  1028.    variables used by the SetData and GetData methods of all the dialogs in
  1029.    OOGrid Library(TM) v1.0.
  1030.  
  1031.    The implemented views are:
  1032.  
  1033.         a) TSheetInputLine: a TInputLine's descendant that can be inserted in a
  1034.         TSpreadSheetWindow (see GLWINDOW.PAS) and in modal state.
  1035.  
  1036.         b) TLimScrollBar: a TScrollBar's decendant that can be used to scroll
  1037.         over a large area, while display the scrolling over a smaller area.
  1038.  
  1039.         c) TMessageLine: A TView's descendat that is used to display messages at
  1040.         the status line.  TMessageLine is used by the DisplayMessage and
  1041.         EraseMessage functions also implemented in this unit.
  1042.  
  1043.    ************************************************************************
  1044.                                  GLWINDOW.PAS Unit
  1045.    ************************************************************************
  1046.  
  1047.    The GLWINDOW unit implements a TWindow's descendant, TSpreadSheetWindow, 
  1048.    that can own a TSpreadSheet object.
  1049.  
  1050.    This unit also declares the additional palette entries that must be added to
  1051.    Turbo Vision's standard application palette
  1052.  
  1053.    ************************************************************************
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.                                          5
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.    II. IDENTIFIERS DESCRIPTION
  1092.  
  1093.    ************************************************************************
  1094.    BlockOperation type
  1095.    ************************************************************************
  1096.    DECLARATION:
  1097.  
  1098.         BlockOperation = (opCopy, opMove);
  1099.  
  1100.    UNIT:
  1101.  
  1102.         GLTSHEET.PAS
  1103.  
  1104.    DESCRIPTION:
  1105.  
  1106.         Used by the clipboard record to indicate what kind of operation was
  1107.         requested.
  1108.  
  1109.    ************************************************************************
  1110.    CellPos type
  1111.    ************************************************************************
  1112.    DECLARATION:
  1113.  
  1114.         CellPos = record
  1115.           Col : Word;
  1116.           Row : Word;
  1117.         end; {...CellPos }
  1118.  
  1119.    UNIT:
  1120.  
  1121.         GLSUPPRT.PAS
  1122.  
  1123.    DESCRIPTION:
  1124.  
  1125.         Stores the position of a cell in the spreadsheet.
  1126.  
  1127.    ************************************************************************
  1128.    CellTypes type
  1129.    ************************************************************************
  1130.    DECLARATION:
  1131.  
  1132.         CellTypes = (ClEmpty, ClValue, ClText, ClFormula, ClRepeat);
  1133.  
  1134.    UNIT:
  1135.  
  1136.         GLCELL.PAS
  1137.  
  1138.    DESCRIPTION:
  1139.  
  1140.         Enumerates all the available cell types in OOGrid Library(TM) v1.0.
  1141.  
  1142.    ************************************************************************
  1143.    ChangeHeaderDialog function
  1144.    ************************************************************************
  1145.    DECLARATION:
  1146.  
  1147.         function ChangeHeaderDialog : PDialog;
  1148.  
  1149.  
  1150.                                          6
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.    UNIT:
  1160.  
  1161.         GLTVR_US.PAS
  1162.  
  1163.    DESCRIPTION:
  1164.  
  1165.         (see CreateOOGLDialogs)
  1166.  
  1167.    ************************************************************************
  1168.    ChangeXXXX constants
  1169.    ************************************************************************
  1170.    DECLARATION:
  1171.  
  1172.         ChangeYes = True;
  1173.         ChangeNo = False;
  1174.  
  1175.    UNIT:
  1176.  
  1177.         GLTSHEET.PAS
  1178.  
  1179.    DESCRIPTION:
  1180.  
  1181.         Used with TOverwriteHashTable's Add and Delete methods to indicate if
  1182.         overwrite information for surrounding cells should be changed if
  1183.         necessary.
  1184.  
  1185.    ************************************************************************
  1186.    ClipBoard variable
  1187.    ************************************************************************
  1188.    DECLARATION:
  1189.  
  1190.         Clipboard : ClipBoardRecord;
  1191.  
  1192.    UNIT:
  1193.  
  1194.         GLTSHEET.PAS
  1195.  
  1196.    DESCRIPTION:
  1197.  
  1198.         This variable is used to store the information necessary for copy and
  1199.         move operations.
  1200.  
  1201.         (see ClipBoardRecord, TSpreadSheet.CopyCellBlock,
  1202.         TSpreadSheet.MoveCellBlock)
  1203.  
  1204.    ************************************************************************
  1205.    ClipBoardRecord type
  1206.    ************************************************************************
  1207.    DECLARATION:
  1208.  
  1209.         ClipBoardRecord = RECORD
  1210.           Active            : Boolean;
  1211.           SourceSpreadSheet : PSpreadSheet;
  1212.           SourceCellHash    : PCellHashTable;
  1213.           BlockToCopy       : PBlock;
  1214.           CopyBlock         : Boolean;
  1215.           Operation         : BlockOperation;
  1216.         end; {...ClipBoardRecord }
  1217.  
  1218.                                             7
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.    UNIT:
  1228.  
  1229.         GLTSHEET.PAS
  1230.  
  1231.    DESCRIPTION:
  1232.  
  1233.         This record is used to store information necessary for copy and move
  1234.         operations.
  1235.  
  1236.    REMARKS:
  1237.  
  1238.         (see TSpreadSheet.CopyCellBlock, TSpreadSheet.MoveCellBlock)
  1239.  
  1240.  
  1241.    ************************************************************************
  1242.    cmXXXX constants
  1243.    ************************************************************************
  1244.  
  1245.    UNIT:
  1246.  
  1247.         GLEQUATES.PAS
  1248.  
  1249.    DESCRIPTION:
  1250.  
  1251.         The following is a description of all commands in Grid Library(TM) v1.0. 
  1252.         The values of this constants depend on the value assigned to the
  1253.         InitCommandNumber constant.
  1254.  
  1255.         Constant                 Description
  1256.         ----------------------------------------------------------------- 
  1257.         cmChangeColHeaders       Change the header of the selected columns
  1258.           cmChangeColWidth            Change the width of the selected columns
  1259.           cmDeleteColHeaders          Delete the header of the selected columns
  1260.           cmDeleteColumns             Delete the selected columns 
  1261.           cmDeleteRows                Delete the selected rows
  1262.           cmEditCell                  Edit the contents of the selected cell
  1263.           cmFormatCells               Format the selected cells
  1264.           cmFormatDefault             Erase all format information about the
  1265.                                       selected cells
  1266.           cmGoToCell                  Go to a new cell in the spreadsheet
  1267.           cmInsertColumns             Insert a column(s) in the selected area
  1268.           cmInsertRows                Insert a row(s) in the selected area
  1269.           cmNewSheet                  Should be used by your application if you
  1270.                                       want to be able to create new spreadsheets
  1271.                                       without cancelling a copy or move
  1272.                                       operation
  1273.           cmPrintSheet                Prints a spreadsheet
  1274.           cmRecalc                    Recalculates the values of the cells in
  1275.                                       the spreadsheet
  1276.           cmToggleAutoCalc            Turns on/off the automatic recaculation of
  1277.                                       cells
  1278.           cmToggleFormulas            Display/Hides formulas
  1279.           cmToggleHeaders             Display/Hides custom assigned headers
  1280.           cmToggleProtection          Protects/Unprotects the contents of a
  1281.                                       spreadsheet
  1282.           cmSetLocked                 Mark the selected cells as locked (the
  1283.                                       default state)
  1284.           cmSetUnlocked               Mark the selected cells as unlocked
  1285.  
  1286.                                             8
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.           cmSortData                  Sorts by rows the selected cells
  1296.  
  1297.    ************************************************************************
  1298.    ColStartArray type
  1299.    ************************************************************************
  1300.    DECLARATION:
  1301.  
  1302.         ColStartArray = array[0..ScreenCols] of Byte;
  1303.  
  1304.    UNIT:
  1305.  
  1306.         GLTSHEET.PAS
  1307.  
  1308.    DESCRIPTION:
  1309.  
  1310.         Array used to store the screen columns where the columns of the
  1311.         spreadsheet will be displayed.
  1312.  
  1313.    ************************************************************************
  1314.    CommasPart constant
  1315.    ************************************************************************
  1316.    DECLARATION:
  1317.  
  1318.         CommasPart = $80;
  1319.  
  1320.    UNIT:
  1321.  
  1322.         GLCELL.PAS
  1323.  
  1324.    DESCRIPTION:
  1325.  
  1326.         Bits in a cell's format value that indicate if a number should be
  1327.         displayed with commas.
  1328.  
  1329.    REMARKS:
  1330.  
  1331.         (see FormatType)
  1332.  
  1333.  
  1334.    ************************************************************************
  1335.    CreateOOGLDialogs procedure
  1336.    ************************************************************************
  1337.    DECLARATION:
  1338.  
  1339.         procedure CreateOOGLDialogs(ResourceFile: PResourceFile);
  1340.  
  1341.    UNIT:
  1342.  
  1343.         GLTVR_US.PAS
  1344.  
  1345.    DESCRIPTION:
  1346.  
  1347.         Creates and adds each of the dialogs used in OOGrid Library(TM) v1.0 to
  1348.         the given resource file.
  1349.  
  1350.    PARAMETERS' DESCRIPTION:
  1351.  
  1352.         ResourceFile   :    the resource file where the views will be stored.
  1353.  
  1354.                                             9
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.    REMARKS:
  1364.  
  1365.         This procedure calls several private functions. Each of these functions
  1366.         returns a pointer to a dialog (with the exception of the InputLine
  1367.         function, which returns a pointer to a TSheetInputLine object).  The
  1368.         following is a list of all the functions and string indexes used to add
  1369.         each view to the resource file:
  1370.  
  1371.         Private Function              String Index
  1372.         -------------------------------------------------------
  1373.           FormatDialog                'FormatDialog'
  1374.           PasteDialog                 'FormulasDialog'
  1375.           GoToDialog                  'GoToDialog'
  1376.           ChangeHeaderDialog          'ChangeHeaderDialog'
  1377.           PrintDialog                 'PrintDialog'
  1378.           SortDialog                  'SortDialog'
  1379.           GetWidthDialog              'GetWidthDialog'
  1380.           InputLine                   'InputLine'
  1381.           PrintToDialog               'PrintToDialog'
  1382.           PrintingDialog              'PrintingDialog'
  1383.           SortingDialog               'SortingDialog'
  1384.           UpdatingTablesDialog        'UpdatingTablesDialog'
  1385.  
  1386.         **The dialogs were created using David Baldwin's Dialog Design program.
  1387.  
  1388.         (see GLResFile)
  1389.  
  1390.  
  1391.    ************************************************************************
  1392.    CreateOOGLStrings procedure
  1393.    ************************************************************************
  1394.    DECLARATION:
  1395.  
  1396.         procedure CreateOOGLStrings(ResourceFile: PResourceFile);
  1397.  
  1398.    UNIT:
  1399.  
  1400.         GLTVR_US.PAS
  1401.  
  1402.    DESCRIPTION:
  1403.  
  1404.         Creates the string list used by objects in OOGrid Library(TM) v1.0 and
  1405.         adds it to the given resource file.
  1406.  
  1407.    PARAMETERS' DESCRIPTION:
  1408.  
  1409.         ResourceFile   :    the resource file where the string list will be
  1410.                             stored.
  1411.  
  1412.    REMARKS:
  1413.  
  1414.         (see GLStringList)
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.                                          10
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.    ************************************************************************
  1432.    CSheetInputLine constant
  1433.    ************************************************************************
  1434.    DECLARATION:
  1435.  
  1436.         CSheetInputLine = #9#9#10#11;
  1437.  
  1438.    UNIT:
  1439.  
  1440.         GLVIEWS.PAS
  1441.  
  1442.    DESCRIPTION:
  1443.  
  1444.         TSheetInputLine's palette.
  1445.  
  1446.    REMARKS:
  1447.  
  1448.         CSheetInputLine palette layout:
  1449.            1 = Passive
  1450.            2 = Active 
  1451.            3 = Arrow
  1452.            4 = Selected
  1453.  
  1454.  
  1455.    ************************************************************************
  1456.    CSpreadSheet constant
  1457.    ************************************************************************
  1458.    DECLARATION:
  1459.  
  1460.         CSpreadSheet =
  1461.              #12#13#14#15#16#17#18#19#20#21#22#23#24#25#26#27#28#29#30+
  1462.              #31#32#33#34#35#36;
  1463.  
  1464.    UNIT:
  1465.  
  1466.         GLTSHEET.PAS
  1467.  
  1468.    DESCRIPTION:
  1469.  
  1470.         Color palette of the TSpreadSheet object.
  1471.  
  1472.    REMARKS:
  1473.  
  1474.         CSpreadSheet palette layout:
  1475.  
  1476.             1 = Empty Cell  
  1477.             2 = Value Cell  
  1478.             3 = Text Cell  
  1479.             4 = Repeat Cell  
  1480.             5 = Formula Cell  
  1481.             6 = Column headers  
  1482.             7 = Row numbers  
  1483.             8 = Cell Data Area  
  1484.             9 = Cell Contents Area  
  1485.             10 = Spreadsheet Info Area  
  1486.             11 = Cell In Block  
  1487.             12 = Cell Highlighted  
  1488.             13 = Cell Highlighted in Block  
  1489.  
  1490.                                            11
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.             14 = Unlocked Cell  
  1500.             15 = Unlocked Cell in Block  
  1501.             16 = Unlocked Cell Highlighted  
  1502.             17 = Unlocked Cell Highlighted in Block  
  1503.             18 = Cell Error  
  1504.             19 = Cell Error in Block  
  1505.             20 = Cell Error Highlighted  
  1506.             21 = Cell Error Highlighted in Block  
  1507.             22 = Unlocked Cell Error  
  1508.             23 = Unlocked Cell Error in Block  
  1509.             24 = Unlocked Cell Error Highlighted  
  1510.             25 = Unlocked Cell Error Highlighted in Block
  1511.  
  1512.  
  1513.    ************************************************************************
  1514.    CSpreadSheetWindow1 constant
  1515.    ************************************************************************
  1516.    DECLARATION:
  1517.  
  1518.         CSpreadSheetWindow1 =
  1519.                   #50#51#52#64#65#66#67#68#69#70#71#72#73#74#75#76+
  1520.                   #77#78#79#80#81#82#83#84#85#86#87#88;
  1521.  
  1522.    UNIT:
  1523.  
  1524.         GLWINDOW.PAS
  1525.  
  1526.    DESCRIPTION:
  1527.  
  1528.         Color palette that should be used by a TSpreadSheetWindow object when
  1529.         the CSpreadSheetXXXX constants where added to the standard application
  1530.         palettes (no color entries from the help system's color palettes).
  1531.  
  1532.    REMARKS:
  1533.  
  1534.         This is the palette used by the TSpreadSheetWindow object.
  1535.  
  1536.         TSpreadSheetWindow palette layout:
  1537.  
  1538.             1..8 = Blue Window palette  
  1539.             9 = Inputline Normal  
  1540.             10 = Inputline Selected  
  1541.             11 = Inputline Arrows  
  1542.             12 = Empty Cell  
  1543.             13 = Value Cell  
  1544.             14 = Text Cell  
  1545.             15 = Repeat Cell  
  1546.             16 = Formula Cell  
  1547.             17 = Column headers  
  1548.             18 = Row numbers  
  1549.             19 = Cell Data Area  
  1550.             20 = Cell Contents Area  
  1551.             21 = Spreadsheet Info Area  
  1552.             22 = Cell in Block  
  1553.             23 = Cell Highlighted  
  1554.             24 = Cell Highlighted in Block  
  1555.             25 = Unlocked Cell  
  1556.             26 = Unlocked Cell in Block  
  1557.  
  1558.                                            12
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.             27 = Unlocked Cell Highlighted  
  1568.             28 = Unlocked Cell Highlighted in Block  
  1569.             29 = Cell Error  
  1570.             30 = Cell Error in Block  
  1571.             31 = Cell Error Highlighted  
  1572.             32 = Cell Error Highlighted in Block  
  1573.             33 = Unlocked Cell Error  
  1574.             34 = Unlocked Cell Error in Block  
  1575.             35 = Unlocked Cell Error Highlighted  
  1576.             36 = Unlocked Cell Error Highlighted in Block   
  1577.  
  1578.         (see CSpreadSheetWindow2)
  1579.  
  1580.  
  1581.    ************************************************************************
  1582.    CSpreadSheetWindow2 constant
  1583.    ************************************************************************
  1584.    DECLARATION:
  1585.  
  1586.         CSpreadSheetWindow2 =
  1587.                   #50#51#52#72#73#74#75#76#77#78#79#80#81#82#83#84+
  1588.                   #85#86#87#88#89#90#91#92#93#94#95#96;
  1589.  
  1590.    UNIT:
  1591.  
  1592.         GLWINDOW.PAS
  1593.  
  1594.    DESCRIPTION:
  1595.  
  1596.         Color palette that should be used by a TSpreadSheetWindow object when
  1597.         the CSpreadSheetXXXX constants where added to the standard application
  1598.         palettes next to the color entries from the help system's color
  1599.         palettes.
  1600.  
  1601.    REMARKS:
  1602.  
  1603.         A TSpreadSheetWindow should use this palette when OOGrid Library(TM)
  1604.         v1.0 is used simultaneously with Turbo Vision's help system.
  1605.  
  1606.         TSpreadSheetWindow palette layout:
  1607.  
  1608.             1..8 = Blue Window palette  
  1609.             9 = Inputline Normal  
  1610.             10 = Inputline Selected  
  1611.             11 = Inputline Arrows  
  1612.             12 = Empty Cell  
  1613.             13 = Value Cell  
  1614.             14 = Text Cell  
  1615.             15 = Repeat Cell  
  1616.             16 = Formula Cell  
  1617.             17 = Column headers  
  1618.             18 = Row numbers  
  1619.             19 = Cell Data Area  
  1620.             20 = Cell Contents Area  
  1621.             21 = Spreadsheet Info Area  
  1622.             22 = Cell in Block  
  1623.             23 = Cell Highlighted  
  1624.             24 = Cell Highlighted in Block  
  1625.  
  1626.                                            13
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.             25 = Unlocked Cell  
  1636.             26 = Unlocked Cell in Block  
  1637.             27 = Unlocked Cell Highlighted  
  1638.             28 = Unlocked Cell Highlighted in Block  
  1639.             29 = Cell Error  
  1640.             30 = Cell Error in Block  
  1641.             31 = Cell Error Highlighted  
  1642.             32 = Cell Error Highlighted in Block  
  1643.             33 = Unlocked Cell Error  
  1644.             34 = Unlocked Cell Error in Block  
  1645.             35 = Unlocked Cell Error Highlighted  
  1646.             36 = Unlocked Cell Error Highlighted in Block   
  1647.  
  1648.         (see CSpreadSheetWindow1)
  1649.  
  1650.  
  1651.    ************************************************************************
  1652.    CSpreadSheetXXXX constants
  1653.    ************************************************************************
  1654.    DECLARATION:
  1655.  
  1656.         CSpreadSheetColor =
  1657.                   #$1F#$1F#$1F#$1F#$1E#$3F#$3F#$17#$1F#$7F#$7F#$7F#$2F+
  1658.                   #$3F#$70#$7F#$2F#$4F#$74#$7F#$2F#$BF#$F0#$FF#$AF;
  1659.  
  1660.         CSpreadSheetBlackWhite =
  1661.                   #$0F#$0F#$0F#$0F#$07#$0F#$0F#$07#$0F#$7F#$7F#$7F#$0F+
  1662.                   #$0F#$70#$7F#$0F#$7F#$7F#$7F#$0F#$8F#$F0#$FF#$8F;
  1663.  
  1664.         CSpreadSheetMonochrome =
  1665.                   #$0F#$0F#$0F#$0F#$07#$0F#$0F#$07#$0F#$70#$70#$70#$0F+
  1666.                   #$0F#$07#$70#$0F#$70#$0F#$80#$0F#$8F#$8F#$F0#$8F;
  1667.  
  1668.    UNIT:
  1669.  
  1670.         GLWINDOW.PAS
  1671.  
  1672.    DESCRIPTION:
  1673.  
  1674.         Color palettes that must be added to the standard application palettes
  1675.         when using a TSpreadSheet object.
  1676.  
  1677.    ************************************************************************
  1678.    CurrencyCharPart constant
  1679.    ************************************************************************
  1680.    DECLARATION:
  1681.  
  1682.         CurrencyCharPart = $FF00;
  1683.  
  1684.    UNIT:
  1685.  
  1686.         GLCELL.PAS
  1687.  
  1688.    DESCRIPTION:
  1689.  
  1690.         Bits in a cell's format value that indicate the currency character that
  1691.         will be added to a number.
  1692.  
  1693.  
  1694.                                          14
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.    REMARKS:
  1704.  
  1705.         (see CurrencyChar, CurrencyShift, FormatType)
  1706.  
  1707.  
  1708.    ************************************************************************
  1709.    CurrencyPart constant
  1710.    ************************************************************************
  1711.    DECLARATION:
  1712.  
  1713.         CurrencyPart = $40;
  1714.  
  1715.    UNIT:
  1716.  
  1717.         GLCELL.PAS
  1718.  
  1719.    DESCRIPTION:
  1720.  
  1721.         Bits in a cell's format value that indicate if a currency character
  1722.         should be added to a number.
  1723.  
  1724.    REMARKS:
  1725.  
  1726.         (see CurrencyCharPart, FormatType)
  1727.  
  1728.  
  1729.    ************************************************************************
  1730.    CurrencyShift constant
  1731.    ************************************************************************
  1732.    DECLARATION:
  1733.  
  1734.         CurrencyShift = 8;
  1735.  
  1736.    UNIT:
  1737.  
  1738.         GLCELL.PAS
  1739.  
  1740.    DESCRIPTION:
  1741.  
  1742.         Number of places a format value should be left shifted to determine the
  1743.         currency character.
  1744.  
  1745.    REMARKS:
  1746.  
  1747.         To determine the currency character from a format value, assign the
  1748.         result of the operation Chr(FormatValue shl CurrencyShift) to a
  1749.         character or string type variable.
  1750.  
  1751.         (see CurrencyCharPart, CurrencyPart, FormatType)
  1752.  
  1753.  
  1754.    ************************************************************************
  1755.    CurrencyStr type
  1756.    ************************************************************************
  1757.    DECLARATION:
  1758.  
  1759.         CurrencyStr = Str[3];
  1760.  
  1761.  
  1762.                                          15
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.    UNIT:
  1772.  
  1773.         GLCELL.PAS
  1774.  
  1775.    DESCRIPTION:
  1776.  
  1777.         Variables of this type are used to store the currency string that a
  1778.         number will be displayed with.
  1779.  
  1780.    REMARKS:
  1781.  
  1782.         A currency string is made up of an empty space, a currency character and
  1783.         another empty space (e.g. ' $ ').  If a cell's contents should be
  1784.         displayed with a currency character, a currency string is returned by
  1785.         the cell's FormattedString function .
  1786.  
  1787.         (see TCell.FormattedString)
  1788.  
  1789.  
  1790.    ************************************************************************
  1791.    DecPlacesPart constant
  1792.    ************************************************************************
  1793.    DECLARATION:
  1794.  
  1795.         DecPlacesPart = $0F;
  1796.  
  1797.    UNIT:
  1798.  
  1799.         GLCELL.PAS
  1800.  
  1801.    DESCRIPTION:
  1802.  
  1803.         Bits in a cell's format value that indicate the number of decimals a
  1804.         number should be displayed with.
  1805.  
  1806.    REMARKS:
  1807.  
  1808.         (see FormatType)
  1809.  
  1810.  
  1811.    ************************************************************************
  1812.    DefaultXXXX constants
  1813.    ************************************************************************
  1814.  
  1815.    UNIT:
  1816.  
  1817.         GLSUPPRT.PAS
  1818.  
  1819.    DESCRIPTION:
  1820.  
  1821.         Default values that can be used when initializing the TSpreadSheet and
  1822.         TLimScrollBar objects and by TSpreadSheet's Print method. 
  1823.  
  1824.         Constant                           Value
  1825.         ------------------------------------------------  DefaultCurrencyString
  1826.                        ' $ '
  1827.         DefaultDefaultColWidth             10
  1828.         DefaultDefaultDecimalPlaces        2
  1829.  
  1830.                                            16
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.         DefaultEmptyRowsAtBottom           0
  1840.         DefaultEmptyRowsAtTop              0
  1841.         DefaultHScrollBarLimit             27
  1842.         DefaultVScrollBarLimit             104
  1843.         DefaultMaxDecimalPlaces            8
  1844.         DefaultMaxCols                     MaxInt
  1845.         DefaultMaxRows                     MaxInt
  1846.         DefaultMinColWidth                 1
  1847.         DefaultPrinterName                 'PRN';
  1848.         DefaultTopMargin                   '0';
  1849.         DefaultBottomMargin                '0';
  1850.         DefaultLeftMargin                  '0';
  1851.         DefaultRightMargin                 '0';
  1852.         DefaultPageRows                    '60';
  1853.         DefaultNormalCols                  '80';
  1854.         DefaultCondensedCols               '132';
  1855.         DefaultPrinterCondensedOnCode      #15;
  1856.         DefaultPrinterCondensedOffCode     #18;
  1857.         DefaultPrinterUnderlineOnCode      Chr(27)+Chr(45)+Chr(49);
  1858.         DefaultPrinterUnderlineOffCode     Chr(27)+Chr(45)+Chr(48);
  1859.         DefaultPrinterBoldOnCode           Chr(27)+Chr(69);
  1860.         DefaultPrinterBoldOffCode          Chr(27)+Chr(70);
  1861.  
  1862.  
  1863.    ************************************************************************
  1864.    DisplayMessage function
  1865.    ************************************************************************
  1866.    DECLARATION:
  1867.  
  1868.         function DisplayMessage (AMessage:String): Boolean;
  1869.  
  1870.    UNIT:
  1871.  
  1872.         GLVIEWS.PAS
  1873.  
  1874.    DESCRIPTION:
  1875.  
  1876.         Displays a message in the status line.
  1877.  
  1878.    PARAMETERS' DESCRIPTION:
  1879.  
  1880.         AMessage  :    the message that will be displayed.
  1881.  
  1882.    REMARKS:
  1883.  
  1884.         This function creates an instance of TMessageLine and assigns a pointer
  1885.         to it to the MessageLine variable.  If an instance of TMessageLine
  1886.         already exists, the its StatusMessage field is changed to the new
  1887.         message and redisplayed.
  1888.  
  1889.         (see TMessageLine, TMessageLine.StatusMessage, MessageLine,
  1890.         EraseMessage).
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.                                          17
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.    ************************************************************************
  1908.    DisplayXXXX constants
  1909.    ************************************************************************
  1910.    DECLARATION:
  1911.  
  1912.         DisplayYes = True;
  1913.         DisplayNo = False;
  1914.  
  1915.    UNIT:
  1916.  
  1917.         GLTSHEET.PAS
  1918.  
  1919.    DESCRIPTION:
  1920.  
  1921.         Used with TSpreadSheet's Recalc method to indicate if each cell that is
  1922.         updated should be redisplayed or not.
  1923.  
  1924.    ************************************************************************
  1925.    EditXXXX constants
  1926.    ************************************************************************
  1927.    DECLARATION:
  1928.  
  1929.         EditYes = True;
  1930.         EditNo = False;
  1931.  
  1932.    UNIT:
  1933.  
  1934.         GLTSHEET.PAS
  1935.  
  1936.    DESCRIPTION:
  1937.  
  1938.         Used with TSpreadSheet's HandleInput method to indicate if the the data
  1939.         in the cell being modified should be edited or replaced with new data.
  1940.  
  1941.    ************************************************************************
  1942.    Empty variable
  1943.    ************************************************************************
  1944.    DECLARATION:
  1945.  
  1946.         Empty : PCell;
  1947.  
  1948.    UNIT:
  1949.  
  1950.         GLCELL.PAS
  1951.  
  1952.    DESCRIPTION:
  1953.  
  1954.         This is a special cell.  It is used as the return value if a cell cannot
  1955.         be found so that the TEmptyCell methods can be executed instead of
  1956.         having special routines that act differently depending on whether a cell
  1957.         is found ot not.
  1958.  
  1959.    REMARKS:
  1960.  
  1961.         This is the only instance of TEmptyCell used.  It is constructed in the
  1962.         initialization section.
  1963.  
  1964.  
  1965.  
  1966.                                          18
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.    ************************************************************************
  1976.    EraseMessage procedure
  1977.    ************************************************************************
  1978.    DECLARATION:
  1979.  
  1980.         procedure EraseMessage;
  1981.  
  1982.    UNIT:
  1983.  
  1984.         GLVIEWS.PAS
  1985.  
  1986.    DESCRIPTION:
  1987.  
  1988.         Erases a message that was displayed using DisplayMessage.
  1989.  
  1990.    REMARKS:
  1991.  
  1992.         If the MessageLine variable is not NIL, then the TMessageLine object
  1993.         pointed by it is disposed and MessageLine is set to NIL.
  1994.  
  1995.         (see DisplayMessage, MessageLine, TMessageLine)
  1996.  
  1997.  
  1998.    ************************************************************************
  1999.    FixFormulaCol procedure
  2000.    ************************************************************************
  2001.    DECLARATION:
  2002.  
  2003.         procedure FixFormulaCol(CP : PCell; Operation: FormulaOps; After:
  2004.           Word; Diff : Longint; MaxCols, MaxRows : Word);
  2005.  
  2006.    UNIT:
  2007.  
  2008.         GLCELL.PAS
  2009.  
  2010.    DESCRIPTION:
  2011.  
  2012.         Modify the column references of cell addresses in a formula, to reflect
  2013.         a change in position.
  2014.  
  2015.    PARAMETERS' DESCRIPTION:
  2016.  
  2017.         CP        :    formula cell that contains the formula string to be
  2018.                        modified.
  2019.  
  2020.         Operation :    the operation that caused the cell addresses in the
  2021.                        formula to change.
  2022.  
  2023.         After     :    a column number;  only column numbers after this column
  2024.                        will be modified.
  2025.  
  2026.         Diff      :    the value by which a column reference in a cell address
  2027.                        should be modified.
  2028.  
  2029.         MaxCols   :    maximum number of columns in the spreadsheet.
  2030.  
  2031.         MaxRows   :    maximum number of rows in the spreadsheet.
  2032.  
  2033.  
  2034.                                          19
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.    REMARKS:
  2044.  
  2045.         (see FormulaOps)
  2046.  
  2047.  
  2048.    ************************************************************************
  2049.    FixFormulaRow procedure
  2050.    ************************************************************************
  2051.    DECLARATION:
  2052.  
  2053.         procedure FixFormulaRow(CP : PCell; Operation: FormulaOps; After:
  2054.           Word; Diff : Longint; MaxCols, MaxRows : Word);
  2055.  
  2056.    UNIT:
  2057.  
  2058.         GLCELL.PAS
  2059.  
  2060.    DESCRIPTION:
  2061.  
  2062.         Modify the row references of cell addresses in a formula, to reflect a
  2063.         change in position.
  2064.  
  2065.    PARAMETERS' DESCRIPTION:
  2066.  
  2067.         CP        :    formula cell that contains the formula string to be
  2068.                        modified.
  2069.  
  2070.         Operation :    the operation that caused the cell addresses in the
  2071.                        formula to change.
  2072.  
  2073.         After     :    a row number;  only row numbers after this row will be
  2074.                        modified.
  2075.  
  2076.         Diff      :    the value by which a row reference in a cell address
  2077.                        should be modified.
  2078.  
  2079.         MaxCols   :    maximum number of columns in the spreadsheet.
  2080.  
  2081.         MaxRows   :    maximum number of rows in the spreadsheet.
  2082.  
  2083.    REMARKS:
  2084.  
  2085.         (see FormulaOps)
  2086.  
  2087.  
  2088.    ************************************************************************
  2089.    FormatDialog function
  2090.    ************************************************************************
  2091.    DECLARATION:
  2092.  
  2093.         function FormatDialog : PDialog;
  2094.  
  2095.    UNIT:
  2096.  
  2097.         GLTVR_US.PAS
  2098.  
  2099.  
  2100.  
  2101.  
  2102.                                          20
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.    DESCRIPTION:
  2112.  
  2113.         (see CreateOOGLDialogs)
  2114.  
  2115.    ************************************************************************
  2116.    FormatType type
  2117.    ************************************************************************
  2118.    DECLARATION:
  2119.  
  2120.         FormatType = Word;
  2121.  
  2122.    UNIT:
  2123.  
  2124.         GLCELL.PAS
  2125.  
  2126.    DESCRIPTION:
  2127.  
  2128.         Variables of this type are used to store format values.
  2129.  
  2130.    REMARKS:
  2131.         Format Bits:
  2132.         ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
  2133.         │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │
  2134.         └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
  2135.           └─────────────┬─────────────┘   │   │   └─┬─┘   └─────┬─────┘
  2136.                                           │   │     │           │
  2137.                 Currency Character        │   │     │           │
  2138.                     = $FF00               │   │     │           │
  2139.                                           │   │     │           │
  2140.                 Add commas to numbers ────┘   │     │           │
  2141.                               = $80           │     │           │
  2142.              Add a currency character ────────┘     │           │
  2143.                               = $40                 │           │
  2144.                         Justification ──────────────┘           │
  2145.                               = $30                             │
  2146.              Number of decimal places ──────────────────────────┘
  2147.                               = $0F
  2148.  
  2149.    ************************************************************************
  2150.    FormulaOps type
  2151.    ************************************************************************
  2152.    DECLARATION:
  2153.  
  2154.         FormulaOps = (opInsert, opDelete);
  2155.  
  2156.    UNIT:
  2157.  
  2158.         GLCELL.PAS
  2159.  
  2160.    DESCRIPTION:
  2161.  
  2162.         Used to indicate the operation that caused a cell address in a formula
  2163.         to change.
  2164.  
  2165.  
  2166.  
  2167.  
  2168.                                          21
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.    REMARKS:
  2178.  
  2179.         If a column or a row was inserted then the column or row values in
  2180.         affected cell addresses must be increased to reflect the change; if a
  2181.         column or a row was deleted then the column or row values in affected
  2182.         cell addresses must be decreased to reflect the change.
  2183.         (see FixFormulaCol, FixFormulaRow)
  2184.  
  2185.  
  2186.    ************************************************************************
  2187.    FormulaStart function
  2188.    ************************************************************************
  2189.    DECLARATION:
  2190.  
  2191.         function FormulaStart(Inp : String; Start, MaxCols, MaxRows :
  2192.           Word; var P : CellPos; var FormLen : Word) : Boolean;
  2193.  
  2194.    UNIT:
  2195.  
  2196.         GLCELL.PAS
  2197.  
  2198.    DESCRIPTION:
  2199.  
  2200.         Checks to see if a place in a string is the beggining of a formula.
  2201.  
  2202.    PARAMETERS' DESCRIPTION:
  2203.  
  2204.         Inp     : the string to be checked.
  2205.  
  2206.         Start   : the place in the string that will be checked.
  2207.  
  2208.         MaxCols : the maximum number of columns in the spreadsheet.
  2209.  
  2210.         MaxRows : the maximum number of rows in the spreadsheet.
  2211.  
  2212.         P       : if the given place in the string is the beggining of a
  2213.                   formula, the cell address that begins the formula will be
  2214.                   returned in this parameter.
  2215.  
  2216.         FormLen : the length of the beggining of the formula (the length of the
  2217.                   cell address) will be returned in this parameter.
  2218.  
  2219.    REMARKS:
  2220.  
  2221.         The function will return TRUE if the place in the string was the
  2222.         beggining of a formula; FALSE otherwise.
  2223.  
  2224.  
  2225.    ************************************************************************
  2226.    GetColWidth function
  2227.    ************************************************************************
  2228.    DECLARATION:
  2229.  
  2230.         function GetColWidth(var WHash : TWidthHashTable; C : Word) :
  2231.           Byte;
  2232.  
  2233.  
  2234.  
  2235.  
  2236.                                          22
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.    UNIT:
  2246.  
  2247.         GLTSHEET.PAS
  2248.  
  2249.    DESCRIPTION:
  2250.  
  2251.         Searches for a column's width in a width hash table.
  2252.  
  2253.    PARAMETERS' DESCRIPTION:
  2254.  
  2255.         WHash :   the TWidthHashTable object that will be used to determine the
  2256.                   column's width
  2257.         C     :   the column's number; the width of this column will be the
  2258.                   width returned by the function.
  2259.  
  2260.    ************************************************************************
  2261.    GetColWidthFunc type
  2262.    ************************************************************************
  2263.    DECLARATION:
  2264.  
  2265.         GetColWidthFunc = function(var WHash: TWidthHashTable;
  2266.           C: Word): Byte;
  2267.  
  2268.    UNIT:
  2269.  
  2270.         GLCELL.PAS
  2271.  
  2272.    DESCRIPTION:
  2273.  
  2274.         (see GetColWidth)
  2275.  
  2276.    ************************************************************************
  2277.    GetWidthDialog function
  2278.    ************************************************************************
  2279.    DECLARATION:
  2280.  
  2281.         function GetWidthDialog : PDialog;
  2282.  
  2283.    UNIT:
  2284.  
  2285.         GLTVR_US.PAS
  2286.  
  2287.    DESCRIPTION:
  2288.  
  2289.         (see CreateOOGLDialogs)
  2290.  
  2291.    ************************************************************************
  2292.    GLResFile variable
  2293.    ************************************************************************
  2294.    DECLARATION:
  2295.  
  2296.         GLResFile : PResourceFile;
  2297.  
  2298.    UNIT:
  2299.  
  2300.         GLSUPPRT.PAS
  2301.  
  2302.  
  2303.  
  2304.                                          23
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.    DESCRIPTION:
  2314.  
  2315.         Pointer to the resource file to be used by the TSpreadSheet object.
  2316.  
  2317.    REMARKS:
  2318.  
  2319.         This variable must be initialized before creating the first instance of
  2320.         TSpreadSheet; failure to do so, may cause the system to crash.  Also,
  2321.         allways remember to close the resource file associated to this variable.
  2322.  
  2323.  
  2324.  
  2325.    ************************************************************************
  2326.    GLSortExit procedure
  2327.    ************************************************************************
  2328.    DECLARATION:
  2329.  
  2330.         procedure GLSortExit;
  2331.  
  2332.    UNIT:
  2333.  
  2334.         GLSORT.PAS
  2335.  
  2336.    DESCRIPTION:
  2337.  
  2338.         Exit procedure of the GLSORT unit.  It disposes the TSortObject created
  2339.         in the initalization section.
  2340.  
  2341.    ************************************************************************
  2342.    GLStringList variable
  2343.    ************************************************************************
  2344.    DECLARATION:
  2345.  
  2346.         GLStringList : PStringList;
  2347.  
  2348.    UNIT:
  2349.  
  2350.         GLSUPPRT.PAS
  2351.  
  2352.    DESCRIPTION:
  2353.  
  2354.         Pointer to the string list used by the TSpreadSheet object.
  2355.  
  2356.    REMARKS:
  2357.  
  2358.         This variable must be initialized before creating the first instance of
  2359.         TSpreadSheet; failure to do so, may cause the system to crash.  Also,
  2360.         allways remember to dispose the TStringList object associated to this
  2361.         variable.
  2362.  
  2363.  
  2364.    ************************************************************************
  2365.    GoToDialog function
  2366.    ************************************************************************
  2367.    DECLARATION:
  2368.  
  2369.         function GoToDialog : PDialog;
  2370.  
  2371.  
  2372.                                          24
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.    UNIT:
  2382.  
  2383.         GLTVR_US.PAS
  2384.  
  2385.    DESCRIPTION:
  2386.  
  2387.         (see CreateOOGLDialogs)
  2388.  
  2389.    ************************************************************************
  2390.    hcXXXX constants
  2391.    ************************************************************************
  2392.  
  2393.    UNIT:
  2394.  
  2395.         GLEQUATES.PAS
  2396.  
  2397.    DESCRIPTION:
  2398.  
  2399.         The following is a description of all help contexts in OOGrid
  2400.         Library(TM) v1.0.  The values of this constants depend on the values
  2401.         assigned to the InitStandardContextNumber and InitHelpContextNumber
  2402.         constants.
  2403.  
  2404.          Constant                Description
  2405.         -----------------------------------------------------------------
  2406.           hcYes                  'Yes' button in a dialog
  2407.           hcNo                   'No' button in a dialog
  2408.           hcOk                   'OK' button in a dialog
  2409.           hcCancel               'Cancel' button in a dialog
  2410.           hcBottomMargin         Input line in the 'Print' dialog for the bottom
  2411.                                  margin
  2412.           hcChangeHeaderInput    Input line in the 'Change header' dialog for
  2413.                                  the header
  2414.           hcCondensedCols        Input line in the 'Print' dialog for the number
  2415.                                  of condensed columns (in a page)
  2416.           hcCurrencyChar         Input line in the 'Format cells' dialog for the
  2417.                                  currency character
  2418.           hcDecimalPlaces        Input line in the 'Format cells' dialog for the
  2419.                                  number of decimal places of a number
  2420.           hcFirstKey             Input line in the 'Sort' dialog for the first
  2421.                                  sort key
  2422.           hcGetWidthInput        Input line in the 'Change width' dialog for a
  2423.                                  column's new width
  2424.           hcGoToCellInput        Input line in the 'Go to' dialog for the
  2425.                                  destination cell
  2426.           hcInputLine            Input line where spreadsheet data is entered
  2427.           hcLeftMargin           Input line in the 'Print' dialog for the left
  2428.                                  margin
  2429.           hcNormalCols           Input line in the 'Print' dialog for the number
  2430.                                  of normal columns (in a page)
  2431.           hcPageRows             Input line in the 'Print' dialog for the number
  2432.                                  of rows (in a page)
  2433.           hcPleaseWait           Dialogs that indicate the user to wait
  2434.           hcRightMargin          Input line in the 'Print' dialog for the right
  2435.                                  margin
  2436.           hcSecondKey            Input line in the 'Sort' dialog for the second
  2437.                                  sort key
  2438.           hcThirdKey             Input line in the 'Sort' dialog for the third
  2439.  
  2440.                                            25
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.                                  sort key
  2450.           hcTopMargin            Input line in the 'Print' dialog for the top
  2451.                                  margin
  2452.  
  2453.         Cluster:
  2454.           hcCopyColLiteral       Checkbox in the 'Paste' dialog to copy columns
  2455.                                  literally
  2456.           hcCopyRowLiteral       Checkbox in the 'Paste' dialog to copy rows
  2457.                                  literally
  2458.         Cluster:
  2459.           hcCurrencyFormat       Checkbox in the 'Format cells' dialog to
  2460.                                  display numbers with a currency character
  2461.           hcPutCommasInNumbers   Checkbox in the 'Format cells' dialog to
  2462.                                  display numbers with commas
  2463.  
  2464.         Cluster:
  2465.           hcJustLeft             Radio button in the 'Format cells' dialog to
  2466.                                  left justify a cell
  2467.           hcJustCenter           Radio button in the 'Format cells' dialog to
  2468.                                  center justify a cell
  2469.           hcJustRight            Radion button in the 'Format cells' dialog to
  2470.                                  right justify a cell
  2471.  
  2472.         Cluster:
  2473.           hcPrintToPrinter       Radio button in the 'Print' dialog to print a
  2474.                                  spreadsheet to the printer 
  2475.           hcPrintToFile          Radion button in the 'Print' dialog to print a
  2476.                                  spreadsheet to a file
  2477.  
  2478.         Cluster:
  2479.           hcPrintNormal          Radio button in the 'Print' dialog to print a
  2480.                                  spreadsheet in normal characters
  2481.           hcPrintCondensed       Radio button in the 'Print' dialog to print a
  2482.                                  spreadsheet in condensed character
  2483.  
  2484.         Cluster:
  2485.           hcPrintRowsNo          Radio button in the 'Print' dialog to not print
  2486.                                  row numbers
  2487.           hcPrintRowsLeft        Radio button in the 'Print' dialog to print row
  2488.                                  numbers (only in left pages)
  2489.           hcPrintRowsAlways      Radio button in the 'Print' dialog to always
  2490.                                  print row numbers 
  2491.  
  2492.         Cluster:
  2493.           hcPrintColsNo          Radio button in the 'Print' dialog to not print
  2494.                                  column headers
  2495.           hcPrintColsTop         Radio button in the 'Print' dialog to print
  2496.                                  column headers(only in upper pages)
  2497.           hcPrintColsAlways      Radio button in the 'Print' dialog to print
  2498.                                  column headers always
  2499.  
  2500.         Cluster:
  2501.           hcLineOutline          Checkbox in the 'Print' dialog to print row
  2502.                                  outlines
  2503.           hcBoldBorders          Checkbox in the 'Print' dialog to print row
  2504.                                  numbers and column headers in bold characters
  2505.  
  2506.         Cluster:
  2507.  
  2508.                                            26
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.           hcAscending            Radio button in the 'Sort' dialog to sort a
  2518.                                  list in ascending order
  2519.           hcDescending           Radio button in the 'Sort' dialog to sort a
  2520.                                  list in descending order
  2521.  
  2522.    ************************************************************************
  2523.    InitClipboard procedure
  2524.    ************************************************************************
  2525.    DECLARATION:
  2526.  
  2527.         procedure InitClipboard;
  2528.  
  2529.    UNIT:
  2530.  
  2531.         GLTSHEET.PAS
  2532.  
  2533.    DESCRIPTION:
  2534.  
  2535.         Resets the clipboard fields.
  2536.  
  2537.    ************************************************************************
  2538.    InitCommandNumber constant
  2539.    ************************************************************************
  2540.    DECLARATION:
  2541.  
  2542.         InitCommandNumber = 200;
  2543.  
  2544.    UNIT:
  2545.  
  2546.         GLEQUATES.PAS
  2547.  
  2548.    DESCRIPTION:
  2549.  
  2550.         The starting number of the sequence of values that will be assigned to
  2551.         the list of command values used by the dialogs in OOGrid Library(TM)
  2552.         v1.0 and by the TSpreadSheet object.
  2553.  
  2554.    REMARKS:
  2555.  
  2556.         (see the description of GLEQUATES.PAS)
  2557.  
  2558.  
  2559.    ************************************************************************
  2560.    InitHelpContextNumber constant
  2561.    ************************************************************************
  2562.    DECLARATION:
  2563.  
  2564.         InitHelpContextNumber = 100;
  2565.  
  2566.    UNIT:
  2567.  
  2568.         GLEQUATES.PAS
  2569.  
  2570.    DESCRIPTION:
  2571.  
  2572.         The starting number of the sequence of values that will be assigned to
  2573.         the list of help contexts used by all the dialogs and views in OOGrid
  2574.         Library(TM) v.1.0.
  2575.  
  2576.                                            27
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.    REMARKS:
  2586.  
  2587.         (see the description of GLEQUATES.PAS)
  2588.  
  2589.  
  2590.    ************************************************************************
  2591.    InitObjectTypeID constant
  2592.    ************************************************************************
  2593.    DECLARATION:
  2594.  
  2595.         InitObjectTypeID = 20000;
  2596.  
  2597.    UNIT:
  2598.  
  2599.         GLEQUATES.PAS
  2600.  
  2601.    DESCRIPTION:
  2602.  
  2603.         The starting number of the sequence of values that will be assigned to
  2604.         the list of type ID's of the objects that will be registered for stream
  2605.         access.
  2606.  
  2607.    REMARKS:
  2608.  
  2609.         (see the description of GLEQUATES.PAS)
  2610.  
  2611.  
  2612.    ************************************************************************
  2613.    InitStandardContextNumber constant
  2614.    ************************************************************************
  2615.    DECLARATION:
  2616.  
  2617.         InitStandardContextNumber = 2;
  2618.  
  2619.    UNIT:
  2620.  
  2621.         GLEQUATES.PAS
  2622.  
  2623.    DESCRIPTION:
  2624.  
  2625.         The starting number of the sequence of values that will be assigned to
  2626.         the list of standard help contexts (hcYes, hcNo, hcOk and hcCancel) used
  2627.         by the dialogs in OOGrid Library(TM) v1.0.
  2628.  
  2629.    REMARKS:
  2630.  
  2631.         (see the description of GLEQUATES.PAS)
  2632.  
  2633.  
  2634.    ************************************************************************
  2635.    InputLine function
  2636.    ************************************************************************
  2637.    DECLARATION:
  2638.  
  2639.         function InputLine : PSheetInputLine;
  2640.  
  2641.  
  2642.  
  2643.  
  2644.                                          28
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.    UNIT:
  2654.  
  2655.         GLTVR_US.PAS
  2656.  
  2657.    DESCRIPTION:
  2658.  
  2659.         Creates a TSheetInputLine object and returns a pointer to it
  2660.  
  2661.    REMARKS:
  2662.  
  2663.         The TSheetInputLine object is added to the resource file to avoid
  2664.         referring to a help context value in the TSpreadSheet object.  All help
  2665.         context values are then used only by the GLTVR_US unit.
  2666.  
  2667.  
  2668.    ************************************************************************
  2669.    Justification type
  2670.    ************************************************************************
  2671.    DECLARATION:
  2672.  
  2673.         Justification = (JLeft, JCenter, JRight);
  2674.  
  2675.    UNIT:
  2676.  
  2677.         GLCELL.PAS
  2678.  
  2679.    DESCRIPTION:
  2680.  
  2681.         Enumerates all the different ways the contents of a cell can be
  2682.         justified.
  2683.  
  2684.    REMARKS:
  2685.  
  2686.         (see JustPart)
  2687.  
  2688.  
  2689.    ************************************************************************
  2690.    JustPart constant
  2691.    ************************************************************************
  2692.    DECLARATION:
  2693.  
  2694.         JustPart = $03;
  2695.  
  2696.    UNIT:
  2697.  
  2698.         GLCELL.PAS
  2699.  
  2700.    DESCRIPTION:
  2701.  
  2702.         Bits in a cell's format (after being left shifted JustShift spaces) that
  2703.         indicate the justification (left, center or right) of a cell's contents.
  2704.  
  2705.    REMARKS:
  2706.  
  2707.         Possible results of the operation '(FormatValue shl JustShift) and
  2708.         JustPart' and their meanings:
  2709.  
  2710.              0 : left justification
  2711.  
  2712.                                            29
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.              1 : center justification
  2722.              2 : right justification
  2723.  
  2724.         (see JustShift, FormatType)
  2725.  
  2726.  
  2727.    ************************************************************************
  2728.    Keyposition type
  2729.    ************************************************************************
  2730.    DECLARATION:
  2731.  
  2732.         KeyPosition = (BeforePivot, SameAsPivot, AfterPivot);
  2733.  
  2734.    UNIT:
  2735.  
  2736.         GLSORT.PAS
  2737.  
  2738.    DESCRIPTION:
  2739.  
  2740.         Enumerates the different results of a comparision.
  2741.  
  2742.    REMARKS:
  2743.  
  2744.         The results in the KeyPosition enumerated type indicate the position of
  2745.         the key being compared with the pivot (or reference) used by the
  2746.         QuickSort algorithm when sorting a list.
  2747.  
  2748.         (see TSortObject.CurrRowPosition, TSortObject.CurrKeyPosition)
  2749.  
  2750.  
  2751.    ************************************************************************
  2752.    KeyValue type
  2753.    ************************************************************************
  2754.    DECLARATION:
  2755.  
  2756.         KeyValue = record
  2757.           Error : Boolean;
  2758.           case CellType : CellTypes of
  2759.             ClText,
  2760.             ClRepeat : (StrValue: String);
  2761.             ClValue,
  2762.             ClFormula : (Value: Extended);
  2763.         end; {...KeyValue }
  2764.  
  2765.    UNIT:
  2766.  
  2767.         GLSORT.PAS
  2768.  
  2769.    DESCRIPTION:
  2770.  
  2771.         This record is used to store information about the cells being compared. 
  2772.         The result of comparing two cells depends of the error status, the
  2773.         cells' type and the cells' contents.
  2774.  
  2775.    REMARKS:
  2776.  
  2777.         (see TSortObject.FillKeyRec)
  2778.  
  2779.  
  2780.                                          30
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.    ************************************************************************
  2790.    MessageLine variable
  2791.    ************************************************************************
  2792.    DECLARATION:
  2793.  
  2794.         MessageLine : PMessageLine
  2795.  
  2796.    UNIT:
  2797.  
  2798.         GLVIEWS.PAS
  2799.  
  2800.    DESCRIPTION:
  2801.  
  2802.         Global variable used to create an instance of a TMessageLine object.
  2803.  
  2804.    REMARKS:
  2805.  
  2806.         The DisplayMessage function and the EraseMessage procedure use this
  2807.         variable to determine if an instance of TMessageLine already exists and
  2808.         where to find it.
  2809.  
  2810.         (see DisplayMessage, EraseMessage)
  2811.  
  2812.  
  2813.    ************************************************************************
  2814.    ModifiedXXXX constants
  2815.    ************************************************************************
  2816.    DECLARATION:
  2817.  
  2818.         ModifiedYes = True;
  2819.         ModifiedNo = False;
  2820.  
  2821.    UNIT:
  2822.  
  2823.         GLTSHEET.PAS
  2824.  
  2825.    DESCRIPTION:
  2826.  
  2827.         Used with TSpreadSheet's SetChanged method to indicate if the
  2828.         spreadsheet has been modified or not.
  2829.  
  2830.    ************************************************************************
  2831.    NumberFormatShift constant
  2832.    ************************************************************************
  2833.    DECLARATION:
  2834.  
  2835.         NumberFormatShift = 6;
  2836.  
  2837.    UNIT:
  2838.  
  2839.         GLCELL.PAS
  2840.  
  2841.    DESCRIPTION:
  2842.  
  2843.         Number of spaces a format value should be left shifted to determine the
  2844.         format for numbers.
  2845.  
  2846.  
  2847.  
  2848.                                          31
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.    REMARKS:
  2858.  
  2859.         After left shifting a format value by NumberFormatShift spaces, the
  2860.         first two bits of the resulting value indicate how numbers should be
  2861.         formatted.
  2862.  
  2863.              Bit 1 = 1: Add commas to numbers
  2864.              Bit 2 = 1: Add a currency character to numbers
  2865.  
  2866.         (see CommasPart, CurrencyPart, FormatType)
  2867.  
  2868.  
  2869.    ************************************************************************
  2870.    OOGridFileHeader constant
  2871.    ************************************************************************
  2872.    DECLARATION:
  2873.  
  2874.         OOGridFileHeader = 'OOGridLv1.00';
  2875.  
  2876.    UNIT:
  2877.  
  2878.         GLTSHEET.PAS
  2879.  
  2880.    DESCRIPTION:
  2881.  
  2882.         All TSpreadSheet objects stored in a stream will be identified by this
  2883.         file header.
  2884.  
  2885.    ************************************************************************
  2886.    PasteDialog function
  2887.    ************************************************************************
  2888.    DECLARATION:
  2889.  
  2890.         function PasteDialog : PDialog;
  2891.  
  2892.    UNIT:
  2893.  
  2894.         GLTVR_US.PAS
  2895.  
  2896.    DESCRIPTION:
  2897.  
  2898.         (see CreateOOGLDialogs)
  2899.  
  2900.    ************************************************************************
  2901.    PrintDialog function
  2902.    ************************************************************************
  2903.    DECLARATION:
  2904.  
  2905.         function PrintDialog : PDialog;
  2906.  
  2907.    UNIT:
  2908.  
  2909.         GLTVR_US.PAS
  2910.  
  2911.    DESCRIPTION:
  2912.  
  2913.         (see CreateOOGLDialogs)
  2914.  
  2915.  
  2916.                                          32
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.    ************************************************************************
  2926.    PrinterConfigRec variable
  2927.    ************************************************************************
  2928.    DECLARATION:
  2929.  
  2930.         PrinterConfigRec : record
  2931.           PrinterCondensedOnCode : String;
  2932.           PrinterCondensedOffCode : String;
  2933.           PrinterUnderlineOnCode : String;
  2934.           PrinterUnderlineOffCode : String;
  2935.           PrinterBoldOnCode : String;
  2936.           PrinterBoldOffCode : String;
  2937.         end; {...PrinterConfigRec }
  2938.  
  2939.    UNIT:
  2940.  
  2941.         GLSUPPRT.PAS
  2942.  
  2943.    DESCRIPTION:
  2944.  
  2945.         Stores printer codes used when printing a spreadsheet.
  2946.  
  2947.    REMARKS:
  2948.  
  2949.         This record is always initialized with the default values.
  2950.  
  2951.  
  2952.    ************************************************************************
  2953.    PrintingDialog function
  2954.    ************************************************************************
  2955.    DECLARATION:
  2956.  
  2957.         function PrintingDialog : PDialog;
  2958.  
  2959.    UNIT:
  2960.  
  2961.         GLTVR_US.PAS
  2962.  
  2963.    DESCRIPTION:
  2964.  
  2965.         (see CreateOOGLDialogs)
  2966.  
  2967.    ************************************************************************
  2968.    PrintToDialog function
  2969.    ************************************************************************
  2970.    DECLARATION:
  2971.  
  2972.         function PrintToDialog : PDialog;
  2973.  
  2974.    UNIT:
  2975.  
  2976.         GLTVR_US.PAS
  2977.  
  2978.    DESCRIPTION:
  2979.  
  2980.         (see CreateOOGLDialogs)
  2981.  
  2982.  
  2983.  
  2984.                                          33
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.    ************************************************************************
  2994.    RBlock constant
  2995.    ************************************************************************
  2996.    DECLARATION:
  2997.  
  2998.         RBlock : TStreamRec = (
  2999.            ObjType : stRBlock;
  3000.            VmtLink : Ofs(TypeOf(TBlock)^);
  3001.            Load    : @TBlock.Load;
  3002.            Store   : @TBlock.Store
  3003.         );
  3004.  
  3005.    UNIT:
  3006.  
  3007.         GLSUPPRT.PAS
  3008.  
  3009.    DESCRIPTION:
  3010.  
  3011.         Registration record used to register the TBlock object for stream
  3012.         access.
  3013.  
  3014.    REMARKS:
  3015.  
  3016.         (see stRXXXX, RegisterGLSupprt)
  3017.  
  3018.  
  3019.    ************************************************************************
  3020.    RChangeHeader variable
  3021.    ************************************************************************
  3022.    DECLARATION:
  3023.  
  3024.         RChangeHeader : record
  3025.           NewHeader : String[80]; {Inputline}
  3026.         end; {...RChangeHeader }
  3027.  
  3028.    UNIT:
  3029.  
  3030.         GLVIEWS.PAS
  3031.  
  3032.    DESCRIPTION:
  3033.  
  3034.         Global record-type variable used with the GetData and SetData methods of
  3035.         the 'Change Header' dialog.
  3036.  
  3037.    ************************************************************************
  3038.    RChangeWidth variable
  3039.    ************************************************************************
  3040.    DECLARATION:
  3041.  
  3042.         RChangeWidth : record
  3043.           NewWidth : String[10]; {Inputline}
  3044.         end; {...RChangeWidth }
  3045.  
  3046.    UNIT:
  3047.  
  3048.         GLVIEWS.PAS
  3049.  
  3050.  
  3051.  
  3052.                                          34
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.    DESCRIPTION:
  3062.  
  3063.         Global record-type variable used with the GetData and SetData methods of
  3064.         the 'Change width' dialog.
  3065.  
  3066.    ************************************************************************
  3067.    RCopyFormulas variable
  3068.    ************************************************************************
  3069.    DECLARATION:
  3070.  
  3071.         RCopyFormulas : record
  3072.           CopyFormulas : Word; {Checkboxes}
  3073.         end; {...RCopyFormulas }
  3074.  
  3075.    UNIT:
  3076.  
  3077.         GLVIEWS.PAS
  3078.  
  3079.    DESCRIPTION:
  3080.  
  3081.         Global record-type variable used with the GetData and SetData methods of
  3082.         the 'Paste' dialog.
  3083.  
  3084.    ************************************************************************
  3085.    RedrawXXXX constants
  3086.    ************************************************************************
  3087.    DECLARATION:
  3088.  
  3089.         RedrawYes = True;
  3090.         RedrawNo  = False;
  3091.  
  3092.    UNIT:
  3093.  
  3094.         GLTSHEET.PAS
  3095.  
  3096.    DESCRIPTION:
  3097.  
  3098.         Used with TSpreadSheet's ExtendCurrBlock method to indicate if the new
  3099.         block should be redrawn or not.
  3100.  
  3101.    ************************************************************************
  3102.    RegisterGLCell procedure
  3103.    ************************************************************************
  3104.    DECLARATION:
  3105.  
  3106.         procedure RegisterGLCell;
  3107.  
  3108.    UNIT:
  3109.  
  3110.         GLCELL.PAS
  3111.  
  3112.    DESCRIPTION:
  3113.  
  3114.         Register GLCELL.PAS's objects for stream access.
  3115.  
  3116.    REMARKS:
  3117.  
  3118.         It registers the TValueCell, TTextCell, TFormulaCell and TRepeatCell
  3119.  
  3120.                                            35
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.         objects.
  3130.  
  3131.  
  3132.    ************************************************************************
  3133.    RegisterGLSupprt procedure
  3134.    ************************************************************************
  3135.    DECLARATION:
  3136.  
  3137.         procedure RegisterGLSupprt;
  3138.  
  3139.    UNIT:
  3140.  
  3141.         GLSUPPRT.PAS
  3142.  
  3143.    DESCRIPTION:
  3144.  
  3145.         Register the unit's objects for stream access.
  3146.  
  3147.    REMARKS:
  3148.  
  3149.         It registers the TBlock object.
  3150.  
  3151.  
  3152.    ************************************************************************
  3153.    RegisterGLTSheetInputLine procedure
  3154.    ************************************************************************
  3155.    DECLARATION:
  3156.  
  3157.         procedure RegisterGLTSheetInputLine;
  3158.  
  3159.    UNIT:
  3160.  
  3161.         GLTSHEET.PAS
  3162.  
  3163.    DESCRIPTION:
  3164.  
  3165.         Registers all the objects in the GLTSHEET unit for stream access.
  3166.  
  3167.    ************************************************************************
  3168.    RegisterGLViews procedure
  3169.    ************************************************************************
  3170.    DECLARATION:
  3171.  
  3172.         procedure RegisterGLViews;
  3173.  
  3174.    UNIT:
  3175.  
  3176.         GLVIEWS.PAS
  3177.  
  3178.    DESCRIPTION:
  3179.  
  3180.         Registers the unit's objects for stream access.
  3181.  
  3182.    REMARKS:
  3183.  
  3184.         It registers the TLimScrollBar and TSheetInputLine objects.
  3185.  
  3186.  
  3187.  
  3188.                                          36
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.    ************************************************************************
  3198.    RegisterSpreadSheet procedure
  3199.    ************************************************************************
  3200.    DECLARATION:
  3201.  
  3202.         procedure RegisterSpreadSheet;
  3203.  
  3204.    UNIT:
  3205.  
  3206.         GLTSHEET.PAS
  3207.  
  3208.    DESCRIPTION:
  3209.  
  3210.         Registers all the objects in OOGrid Library(TM) v1.0 for stream access.
  3211.  
  3212.    ************************************************************************
  3213.    RemoveXXXX constants
  3214.    ************************************************************************
  3215.    DECLARATION:
  3216.  
  3217.         RemoveBlock = True;
  3218.         RemoveSingleCell = False;
  3219.  
  3220.    UNIT:
  3221.  
  3222.         GLTSHEET.PAS
  3223.  
  3224.    DESCRIPTION:
  3225.  
  3226.         Used with TSpreadSheet's EraseCellBlock method to indicate if a block of
  3227.         cells or only the highlighted cell is being erased.
  3228.  
  3229.    ************************************************************************
  3230.    RepeatFirstChar constant
  3231.    ************************************************************************
  3232.    DECLARATION:
  3233.  
  3234.         RepeatFirstChar = '\';
  3235.  
  3236.    UNIT:
  3237.  
  3238.         GLCELL.PAS
  3239.  
  3240.    DESCRIPTION:
  3241.  
  3242.         Character used to determine when the information entered by the user is
  3243.         a repeat character.
  3244.  
  3245.    REMARKS:
  3246.  
  3247.         This character is never displayed in the spreadsheet; it is only
  3248.         displayed when editing the contents of a repeat cell.
  3249.  
  3250.         (see TRepeatCell)
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.                                          37
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.    ************************************************************************
  3266.    RepeatTextChar constant
  3267.    ************************************************************************
  3268.    DECLARATION:
  3269.  
  3270.         RepeatTextChar = ' ';
  3271.  
  3272.    UNIT:
  3273.  
  3274.         GLCELL.PAS
  3275.  
  3276.    DESCRIPTION:
  3277.  
  3278.         Character used to determine when the information entered by the user is
  3279.         a string.
  3280.  
  3281.    REMARKS:
  3282.  
  3283.         This character is never displayed in the spreadsheet; it is only
  3284.         displayed when editing the contents of a text cell.
  3285.  
  3286.         (see TTextCell)
  3287.  
  3288.  
  3289.    ************************************************************************
  3290.    RFormat variable
  3291.    ************************************************************************
  3292.    DECLARATION:
  3293.  
  3294.         RFormat : record
  3295.           Justification : Word; {RadioButtons}
  3296.           DecimalPlaces : String[1]; {Inputline}
  3297.           CurrencyChar : String[1]; {Inputline}
  3298.           NumberFormat : Word; {Checkboxes}
  3299.         end; {...RFormat }
  3300.  
  3301.    UNIT:
  3302.  
  3303.         GLVIEWS.PAS
  3304.  
  3305.    DESCRIPTION:
  3306.  
  3307.         Global record-type variable used with the GetData and SetData methods of
  3308.         the 'Format cell' dialog.
  3309.  
  3310.    ************************************************************************
  3311.    RFormulaCell constant
  3312.    ************************************************************************
  3313.    DECLARATION:
  3314.  
  3315.         RFormulaCell: TStreamRec = (
  3316.           ObjType: stRFormulaCell;
  3317.           VmtLink: Ofs(TypeOf(TFormulaCell)^);
  3318.           Load: @TFormulaCell.Load;
  3319.           Store: @TFormulaCell.Store
  3320.         );
  3321.  
  3322.  
  3323.  
  3324.                                          38
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.    UNIT:
  3334.  
  3335.         GLCELL.PAS
  3336.  
  3337.    DESCRIPTION:
  3338.  
  3339.         Registration record used to register the TFormulaCell object for stream
  3340.         access.
  3341.  
  3342.    REMARKS:
  3343.  
  3344.         (see stRXXXX, RegisterGLCell)
  3345.  
  3346.  
  3347.    ************************************************************************
  3348.    RGoToCell variable
  3349.    ************************************************************************
  3350.    DECLARATION:
  3351.  
  3352.         RGoToCell : record
  3353.           NewCell : String[10]; {Inputline}
  3354.         end; {...RGoToCell }
  3355.  
  3356.    UNIT:
  3357.  
  3358.         GLVIEWS.PAS
  3359.  
  3360.    DESCRIPTION:
  3361.  
  3362.         Global record-type variable used with the GetData and SetData methods of
  3363.         the 'Go To' dialog.
  3364.  
  3365.    ************************************************************************
  3366.    RLimScrollBar constant
  3367.    ************************************************************************
  3368.    DECLARATION:
  3369.  
  3370.         RLimScrollBar : TStreamRec = (
  3371.            ObjType : stRLimScrollBar;
  3372.            VmtLink : Ofs(TypeOf(TLimScrollBar)^);
  3373.            Load    : @TLimScrollBar.Load;
  3374.            Store   : @TLimScrollBar.Store
  3375.         );
  3376.  
  3377.    UNIT:
  3378.  
  3379.         GLVIEWS.PAS
  3380.  
  3381.    DESCRIPTION:
  3382.  
  3383.         Registration record used to register the TLimScrollBar object for stream
  3384.         access.
  3385.  
  3386.    REMARKS:
  3387.  
  3388.         (see stRXXXX, RegisterGLViews)
  3389.  
  3390.  
  3391.  
  3392.                                          39
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.    ************************************************************************
  3402.    RPrint variable
  3403.    ************************************************************************
  3404.    DECLARATION:
  3405.  
  3406.         RPrint : record
  3407.           PrintTo : Word; {RadioButtons}
  3408.           PrintSize : Word; {RadioButtons}
  3409.           PrintRows : Word; {RadioButtons}
  3410.           PrintColumns : Word; {RadioButtons}
  3411.           TopMargin : String[3]; {Inputline}
  3412.           BottomMargin : String[3]; {Inputline}
  3413.           LeftMargin : String[3]; {Inputline}
  3414.           RightMargin : String[3]; {Inputline}
  3415.           Other : Word; {Checkboxes}
  3416.           PageRows : String[3]; {Inputline}
  3417.           NormalCols : String[3]; {Inputline}
  3418.           CondensedCols : String[3]; {Inputline}
  3419.         end; {...RPrint }
  3420.  
  3421.    UNIT:
  3422.  
  3423.         GLVIEWS.PAS
  3424.  
  3425.    DESCRIPTION:
  3426.  
  3427.         Global record-type variable used with the GetData and SetData methods of
  3428.         the 'Print' dialog.
  3429.  
  3430.    ************************************************************************
  3431.    RRepeatCell constant
  3432.    ************************************************************************
  3433.    DECLARATION:
  3434.  
  3435.         RRepeatCell: TStreamRec = (
  3436.           ObjType: stRRepeatCell;
  3437.           VmtLink: Ofs(TypeOf(TRepeatCell)^);
  3438.           Load: @TRepeatCell.Load;
  3439.           Store: @TRepeatCell.Store
  3440.         );
  3441.  
  3442.    UNIT:
  3443.  
  3444.         GLCELL.PAS
  3445.  
  3446.    DESCRIPTION:
  3447.  
  3448.         Registration record used to register the TRepeatCell object for stream
  3449.         access.
  3450.  
  3451.    REMARKS:
  3452.  
  3453.         (see stRXXXX, RegisterGLCell)
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.                                          40
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.    ************************************************************************
  3470.    RSheetInputLine constant
  3471.    ************************************************************************
  3472.    DECLARATION:
  3473.  
  3474.         RSheetInputLine : TStreamRec = (
  3475.            ObjType : stRSheetInputLine;
  3476.            VmtLink : Ofs(TypeOf(TSheetInputLine)^);
  3477.            Load    : @TSheetInputLine.Load;
  3478.            Store   : @TSheetInputLine.Store
  3479.         );
  3480.  
  3481.    UNIT:
  3482.  
  3483.         GLVIEWS.PAS
  3484.  
  3485.    DESCRIPTION:
  3486.  
  3487.         Registration record used to register the TSheetInputLine object for
  3488.         stream access.
  3489.  
  3490.    REMARKS:
  3491.  
  3492.         (see stRXXXX, RegisterGLViews)
  3493.  
  3494.  
  3495.    ************************************************************************
  3496.    RSortInfo variable
  3497.    ************************************************************************
  3498.    DECLARATION:
  3499.  
  3500.         RSortInfo : record
  3501.           FirstKey : String[80]; {Inputline}
  3502.           FirstKeyOrder : Word; {RadioButtons}
  3503.           SecondKey : String[80]; {Inputline}
  3504.           SecondKeyOrder : Word; {RadioButtons}
  3505.           ThirdKey : String[80]; {Inputline}
  3506.           ThirdKeyOrder : Word; {RadioButtons}
  3507.         end; {...RSortInfo }
  3508.  
  3509.    UNIT:
  3510.  
  3511.         GLVIEWS.PAS
  3512.  
  3513.    DESCRIPTION:
  3514.  
  3515.         Global record-type variable used with the GetData and SetData methods of
  3516.         the 'Sort' dialog.
  3517.  
  3518.    ************************************************************************
  3519.    RSpreadSheet constant
  3520.    ************************************************************************
  3521.    DECLARATION:
  3522.  
  3523.         RSpreadSheet : TStreamRec = (
  3524.            ObjType : stRSpreadSheet;
  3525.            VmtLink : Ofs(TypeOf(TSpreadSheet)^);
  3526.            Load    : @TSpreadSheet.Load;
  3527.  
  3528.                                            41
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.            Store   : @TSpreadSheet.Store
  3538.         );
  3539.  
  3540.    UNIT:
  3541.  
  3542.         GLTSHEET.PAS
  3543.  
  3544.    DESCRIPTION:
  3545.  
  3546.         Registration record used to register the TSpreadSheet object for stream
  3547.         access.
  3548.  
  3549.    REMARKS:
  3550.  
  3551.         (see stRXXXX)
  3552.  
  3553.  
  3554.    ************************************************************************
  3555.    RTextCell constant
  3556.    ************************************************************************
  3557.    DECLARATION:
  3558.  
  3559.         RTextCell: TStreamRec = (
  3560.           ObjType: stRTextCell;
  3561.           VmtLink: Ofs(TypeOf(TTextCell)^);
  3562.           Load: @TTextCell.Load;
  3563.           Store: @TTextCell.Store
  3564.         );
  3565.  
  3566.    UNIT:
  3567.  
  3568.         GLCELL.PAS
  3569.  
  3570.    DESCRIPTION:
  3571.  
  3572.         Registration record used to register the TTextCell object for stream
  3573.         access.
  3574.  
  3575.    REMARKS:
  3576.  
  3577.         (see stRXXXX, RegisterGLCell)
  3578.  
  3579.  
  3580.    ************************************************************************
  3581.    RValueCell constant
  3582.    ************************************************************************
  3583.    DECLARATION:
  3584.  
  3585.         RValueCell: TStreamRec = (
  3586.           ObjType: stRValueCell;
  3587.           VmtLink: Ofs(TypeOf(TValueCell)^);
  3588.           Load: @TValueCell.Load;
  3589.           Store: @TValueCell.Store
  3590.         );
  3591.  
  3592.    UNIT:
  3593.  
  3594.         GLCELL.PAS
  3595.  
  3596.                                          42
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.    DESCRIPTION:
  3606.  
  3607.         Registration record used to register the TValueCell object for stream
  3608.         access.
  3609.  
  3610.    REMARKS:
  3611.  
  3612.         (see stRXXXX, RegisterGLCell)
  3613.  
  3614.  
  3615.    ************************************************************************
  3616.    ScreenColRange type
  3617.    ************************************************************************
  3618.    DECLARATION:
  3619.  
  3620.         ScreenColRange = 0..ScreenCols;
  3621.  
  3622.    UNIT:
  3623.  
  3624.         GLSUPPRT.PAS
  3625.  
  3626.    DESCRIPTION:
  3627.  
  3628.         Variables of this type are used to store the position of a column in the
  3629.         screen.
  3630.  
  3631.    REMARKS:
  3632.  
  3633.         Values that represent positions outside of the valid display area can be
  3634.         easily detected with Range Checking.
  3635.  
  3636.  
  3637.    ************************************************************************
  3638.    ScreenCols constant
  3639.    ************************************************************************
  3640.    DECLARATION:
  3641.  
  3642.         ScreenCols = 77;
  3643.  
  3644.    UNIT:
  3645.  
  3646.         GLSUPPRT.PAS
  3647.  
  3648.    DESCRIPTION:
  3649.  
  3650.         Max number of columns that can be used to display the spreadsheet.
  3651.  
  3652.    REMARKS:
  3653.  
  3654.         All the 80 columns of the screen cannot be used since the spreadsheet is
  3655.         displayed within a window.
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.                                          43
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.    ************************************************************************
  3674.    ScreenPos type
  3675.    ************************************************************************
  3676.    DECLARATION:
  3677.  
  3678.         ScreenPos = record
  3679.            Col : ScreenColRange;
  3680.            Row : ScreenRowRange;
  3681.         end; {...ScreenPos }
  3682.  
  3683.    UNIT:
  3684.  
  3685.         GLSUPPRT.PAS
  3686.  
  3687.    DESCRIPTION:
  3688.  
  3689.         Stores the position of a point in the screen.
  3690.  
  3691.    ************************************************************************
  3692.    ScreenRowRange type
  3693.    ************************************************************************
  3694.    DECLARATION:
  3695.  
  3696.         ScreenRowRange = 0..ScreenRows;
  3697.  
  3698.    UNIT:
  3699.  
  3700.         GLSUPPRT.PAS
  3701.  
  3702.    DESCRIPTION:
  3703.  
  3704.         Variables of this type are used to store the position of a row in the
  3705.         screen.
  3706.  
  3707.    REMARKS:
  3708.  
  3709.         Values that represent positions outside of the valid display area can be
  3710.         easily detected with Range Checking.
  3711.  
  3712.  
  3713.    ************************************************************************
  3714.    ScreenRows constant
  3715.    ************************************************************************
  3716.    DECLARATION:
  3717.  
  3718.         ScreenRows = 46;
  3719.  
  3720.    UNIT:
  3721.  
  3722.         GLSUPPRT.PAS
  3723.  
  3724.    DESCRIPTION:
  3725.  
  3726.         Max numbers of rows that can be used to display the spreadsheet (in any
  3727.         screen mode)
  3728.  
  3729.  
  3730.  
  3731.  
  3732.                                          44
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.    REMARKS:
  3742.  
  3743.         All the 50 columns of a 43/50 lines display cannot be used since the
  3744.         spreadsheet is displayed within a window.
  3745.  
  3746.  
  3747.    ************************************************************************
  3748.    SortDialog function
  3749.    ************************************************************************
  3750.    DECLARATION:
  3751.  
  3752.         function SortDialog : PDialog;
  3753.  
  3754.    UNIT:
  3755.  
  3756.         GLTVR_US.PAS
  3757.  
  3758.    DESCRIPTION:
  3759.  
  3760.         (see CreateOOGLDialogs)
  3761.  
  3762.    ************************************************************************
  3763.    SortingDialog function
  3764.    ************************************************************************
  3765.    DECLARATION:
  3766.  
  3767.         function SortingDialog : PDialog;
  3768.  
  3769.    UNIT:
  3770.  
  3771.         GLTVR_US.PAS
  3772.  
  3773.    DESCRIPTION:
  3774.  
  3775.         (see CreateOOGLDialogs)
  3776.  
  3777.    ************************************************************************
  3778.    SortTypes type
  3779.    ************************************************************************
  3780.    DECLARATION:
  3781.  
  3782.         SortTypes = (Ascending, Descending);
  3783.  
  3784.    UNIT:
  3785.  
  3786.         GLSORT.PAS
  3787.  
  3788.    DESCRIPTION:
  3789.  
  3790.         Enumerates the two types of orders that you can use to sort a list using
  3791.         the sort function.
  3792.  
  3793.    ************************************************************************
  3794.    StandardSortObject variable
  3795.    ************************************************************************
  3796.    DECLARATION:
  3797.  
  3798.         StandardSortObject : PSortObject;
  3799.  
  3800.                                            45
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.    UNIT:
  3810.  
  3811.         GLSORT.PAS
  3812.  
  3813.    DESCRIPTION:
  3814.  
  3815.         This variable points to the sort object used in OOGrid Library(TM) v1.0.
  3816.  
  3817.    REMARKS:
  3818.  
  3819.         (see TSpreadSheet.SortObject)
  3820.  
  3821.  
  3822.    ************************************************************************
  3823.    stRXXXX constants
  3824.    ************************************************************************
  3825.  
  3826.    UNIT:
  3827.  
  3828.         GLEQUATES.PAS
  3829.  
  3830.    DESCRIPTION:
  3831.  
  3832.         The following is a description of all object type ID constants (used in
  3833.         the respective stream registration record) in Grid Library(TM) v1.0. 
  3834.         The values of this constants depend on the value assigned to the
  3835.         InitObjectTypeID constant.
  3836.  
  3837.          Constant                Description
  3838.         -----------------------------------------------------------------
  3839.           stRValueCell           ID of the TValueCell object
  3840.           stRTextCell            ID of the TTextCell object
  3841.           stRFormulaCell         ID of the TFormulaCell object
  3842.           stRRepeatCell          ID of the TRepeatCelleCell object
  3843.           stRBlock               ID of the TBlock object
  3844.           stRLimScrollBar        ID of the TLimScrollBar object
  3845.           stRSheetInputLine      ID of the TSheetInputLine object
  3846.           stRSpreadSheet         ID of the TSpreadSheet object
  3847.  
  3848.    ************************************************************************
  3849.    stXXXX constants
  3850.    ************************************************************************
  3851.  
  3852.    UNIT:
  3853.  
  3854.         GLSUPPRT.PAS
  3855.  
  3856.    DESCRIPTION:
  3857.  
  3858.         Additional stream status constants returned by TSpreadSheet when using
  3859.         streams.
  3860.  
  3861.          Constant               Value Description
  3862.         -----------------------------------------------------------------
  3863.          stNoMemoryError         -7   Returned when an object could not be
  3864.                                       created because of low memory, and the
  3865.                                       stream access operation was not completed
  3866.                                       for that reason
  3867.  
  3868.                                            46
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.          stInvalidFormatError    -8   Returned when the file header (see
  3878.                                       OOGridFileHeader) was not found in a file
  3879.  
  3880.    ************************************************************************
  3881.    sXXXX constants
  3882.    ************************************************************************
  3883.  
  3884.    UNIT:
  3885.  
  3886.         GLSUPPRT.PAS
  3887.  
  3888.    DESCRIPTION:
  3889.  
  3890.         Key constants of all the strings in the TStringList object used by
  3891.         TSpreadSheet (see GLStringList).
  3892.  
  3893.            Constant             Value Description
  3894.         -----------------------------------------------------------------
  3895.           sAutoCalcLetter        1    Displayed in the info area when AutoCalc
  3896.                                       mode is on
  3897.           sBlockDeleteMsg        2    Displayed when deleting a block of cells
  3898.           sBlockName             3    Name of a block
  3899.           sCancelPrintJob        4    Used to prompt the user whether or not to
  3900.                                       cancel a print job
  3901.           sCellError             5    String displayed in a cell when there is a
  3902.                                       numeric error
  3903.           sCellLockedInfo        6    String displayed in the contents line
  3904.                                       (above the input line) when a cell is
  3905.                                       protected
  3906.           sCellsProtectedMsg     7    Indicate the user that the selected cells
  3907.                                       are protected
  3908.           sCellUnlockedInfo      8    String displayed in the contents line
  3909.                                       (above the input line)when a cell is
  3910.                                       unlocked
  3911.           sColumnEntryIndicator  9    Prefix added to column letters in the sort
  3912.                                       and change header dialogs
  3913.           sCopyCellsMsg          10   Displayed when copying a block of cells
  3914.           sDisplayFormulasLetter 11   Displayed in the info area when
  3915.                                       DisplayFormulas mode is on
  3916.           sDisplayHeadersLetter  12   Displayed in the info area when
  3917.                                       DisplayHeaders mode is on
  3918.           sEmptyCellName         13   Name of an empty cell
  3919.           sEndKeyPressedLetter   14   Displayed in the info area when the END
  3920.                                       key was pressed
  3921.           sFilePrintErrorMsg     15   Displayed when there was an error printing
  3922.                                       a spreadsheet to a file
  3923.           sFormatErrorMsg        16   Indicates the user there is an error in
  3924.                                       the format specified
  3925.           sFormatError1Msg       17   Number of decimals out of place
  3926.           sFormatError2Msg       18   Currency character not valid
  3927.           sFormulaCellName       19   Name of a formula cell
  3928.           sInvalidCellMsg        20   Cell address is not valid
  3929.           sInvalidWidthMsg       21   Specified column width not within range
  3930.           sMoveCellsMsg          22   Displayed when moving a block of cells
  3931.           sParseError1           23   Parse stack overflow
  3932.           sParseError2           24   Bad cell range
  3933.           sParseError3           25   Expected expression
  3934.           sParseError4           26   Expected operation
  3935.  
  3936.                                            47
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.           sParseError5           27   Expected opening parenthesis
  3946.           sParseError6           28   Expected cell
  3947.           sParseError7           29   Expected operator or closing parenthesis
  3948.           sPrinterPrintErrorMsg  30   Indicates the user there was an error when
  3949.                                       printing to the printer
  3950.           sPrintInitErrorMsg     31   Indicates the user there was an error when
  3951.                                       initializating the printer or file
  3952.           sPrintToWildCard       32   wildcard used to list the files that can
  3953.                                       be used when printing to a file
  3954.           sRecalcMsg             33   Displayed when recalculating the values of
  3955.                                       all the cells in the spreadsheet
  3956.           sRepeatCellName        34   Name of a repeat cell
  3957.           sTempFileName          35   Name of the file that will be used for
  3958.                                       temporary storage
  3959.           sTextCellName          36   Name of a text cell
  3960.           sValueCellName         37   Name of a value cell
  3961.           sWidthLetter           38   Displayed in the contents area, next to
  3962.                                       the current column's width
  3963.  
  3964.    ************************************************************************
  3965.    TBlock object
  3966.    ************************************************************************
  3967.    DECLARATION:
  3968.  
  3969.         TBlock = object(TObject)
  3970.             AnchorColShifted,
  3971.             AnchorRowShifted : Boolean;
  3972.             Anchor,
  3973.             Start,
  3974.             Stop : CellPos;
  3975.           constructor Init(InitStart : CellPos);
  3976.           function CellInBlock(CheckCell : CellPos) : Boolean;
  3977.           function ExtendTo(NewLoc : CellPos) : Boolean; virtual;
  3978.           constructor Load(var S: TStream);
  3979.           procedure Store(var S: TStream);
  3980.         end; {...TBlock }
  3981.  
  3982.    UNIT:
  3983.  
  3984.         GLSUPPRT.PAS
  3985.  
  3986.    DESCRIPTION:
  3987.  
  3988.         Stores the starting and ending position of a block of cells.  It can
  3989.         extend the block of cells in any direction.
  3990.  
  3991.    ************************************************************************
  3992.    TBlock.Anchor field
  3993.    ************************************************************************
  3994.    DECLARATION:
  3995.  
  3996.         Anchor : CellPos;
  3997.  
  3998.    UNIT:
  3999.  
  4000.         GLSUPPRT.PAS
  4001.  
  4002.  
  4003.  
  4004.                                          48
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.    DESCRIPTION:
  4014.  
  4015.         It is a position in the block that will never move when resizing the
  4016.         block.
  4017.  
  4018.    REMARKS:
  4019.  
  4020.         The anchor of a block is the cell position where the block was created. 
  4021.         It can be either the upper left corner or the lower right corner of the
  4022.         block.
  4023.  
  4024.  
  4025.    ************************************************************************
  4026.    TBlock.AnchorColShifted field
  4027.    ************************************************************************
  4028.    DECLARATION:
  4029.  
  4030.         AnchorColShifted : Boolean;
  4031.  
  4032.    UNIT:
  4033.  
  4034.         GLSUPPRT.PAS
  4035.  
  4036.    DESCRIPTION:
  4037.  
  4038.         Indicates the position of the anchor (see TBlock.Anchor) relative to the
  4039.         position of the stop column.  If FALSE, it means the stop column of the
  4040.         block is located after the column of the anchor (the normal position);
  4041.         if TRUE, it means the stop column of the block is located before the
  4042.         column of the anchor (the shifted position).
  4043.  
  4044.    REMARKS:
  4045.  
  4046.         You will never need to access this field directly.
  4047.  
  4048.  
  4049.    ************************************************************************
  4050.    TBlock.AnchorRowShifted field
  4051.    ************************************************************************
  4052.    DECLARATION:
  4053.  
  4054.         AnchorRowShifted : Boolean;
  4055.  
  4056.    UNIT:
  4057.  
  4058.         GLSUPPRT.PAS
  4059.  
  4060.    DESCRIPTION:
  4061.  
  4062.         Indicates the position of the anchor (see TBlock.Anchor) relative to the
  4063.         position of the stop row.  If FALSE, it means the stop row of the block
  4064.         is located after the row of the anchor (the normal position); if TRUE,
  4065.         it means the stop row of the block is located before the column of the
  4066.         anchor (the shifted position).
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.                                          49
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.    ************************************************************************
  4082.    TBlock.CellInBlock function
  4083.    ************************************************************************
  4084.    DECLARATION:
  4085.  
  4086.         function CellInBlock(CheckCell : CellPos) : Boolean;
  4087.  
  4088.    UNIT:
  4089.  
  4090.         GLSUPPRT.PAS
  4091.  
  4092.    DESCRIPTION:
  4093.  
  4094.         Checks if a given cell is inside the block.
  4095.  
  4096.    PARAMETERS' DESCRIPTION:
  4097.  
  4098.         CheckCell : the position of the cell that is being checked
  4099.  
  4100.    ************************************************************************
  4101.    TBlock.ExtendTo funcition
  4102.    ************************************************************************
  4103.    DECLARATION:
  4104.  
  4105.         function ExtendTo(NewLoc : CellPos) : Boolean; virtual;
  4106.  
  4107.    UNIT:
  4108.  
  4109.         GLSUPPRT.PAS
  4110.  
  4111.    DESCRIPTION:
  4112.  
  4113.         Extends the block to the given position.
  4114.  
  4115.    PARAMETERS' DESCRIPTION:
  4116.  
  4117.         NewLoc :  the position where the block will be extended to;  it can be
  4118.                   any position in the spreadsheet
  4119.  
  4120.    ************************************************************************
  4121.    TBlock.Init CONSTRUCTOR
  4122.    ************************************************************************
  4123.    DECLARATION:
  4124.  
  4125.         constructor Init(InitStart : CellPos);
  4126.  
  4127.    UNIT:
  4128.  
  4129.         GLSUPPRT.PAS
  4130.  
  4131.    DESCRIPTION:
  4132.  
  4133.         Creates and initializes the TBlock object.
  4134.  
  4135.    PARAMETERS' DESCRIPTION:
  4136.  
  4137.         InitStart : the position where the block will be created.
  4138.  
  4139.  
  4140.                                          50
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.    REMARKS:
  4150.  
  4151.         The Start and Stop field will be set to the cell position passed in the
  4152.         InitStart parameter.
  4153.  
  4154.  
  4155.    ************************************************************************
  4156.    TBlock.Load CONSTRUCTOR
  4157.    ************************************************************************
  4158.    DECLARATION:
  4159.  
  4160.         constructor Load(var S: TStream);
  4161.  
  4162.    UNIT:
  4163.  
  4164.         GLSUPPRT.PAS
  4165.  
  4166.    DESCRIPTION:
  4167.  
  4168.         Loads a block from disk.
  4169.  
  4170.    PARAMETERS' DESCRIPTION:
  4171.  
  4172.         S : the stream from which the block will be loaded.
  4173.  
  4174.    ************************************************************************
  4175.    TBlock.Start field
  4176.    ************************************************************************
  4177.    DECLARATION:
  4178.  
  4179.         Start : CellPos;
  4180.  
  4181.    UNIT:
  4182.  
  4183.         GLSUPPRT.PAS
  4184.  
  4185.    DESCRIPTION:
  4186.  
  4187.         The upper left corner of the block.
  4188.  
  4189.    ************************************************************************
  4190.    TBlock.Stop field
  4191.    ************************************************************************
  4192.    DECLARATION:
  4193.  
  4194.         Stop : CellPos;
  4195.  
  4196.    UNIT:
  4197.  
  4198.         GLSUPPRT.PAS
  4199.  
  4200.    DESCRIPTION:
  4201.  
  4202.         The lower right corner of the block.
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.                                          51
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.    ************************************************************************
  4218.    TBlock.Store procedure
  4219.    ************************************************************************
  4220.    DECLARATION:
  4221.  
  4222.         procedure Store(var S: TStream);
  4223.  
  4224.    UNIT:
  4225.  
  4226.         GLSUPPRT.PAS
  4227.  
  4228.    DESCRIPTION:
  4229.  
  4230.         Writes a block to disk.
  4231.  
  4232.    PARAMETERS' DESCRIPTION:
  4233.  
  4234.         S : the stream to which the block will be written.
  4235.  
  4236.    ************************************************************************
  4237.    TCell object
  4238.    ************************************************************************
  4239.    DECLARATION:
  4240.  
  4241.         TCell = OBJECT(TObject)
  4242.             Loc : CellPos;
  4243.           constructor Init(InitLoc : CellPos);
  4244.           destructor Done; virtual;
  4245.           function CellType : CellTypes; virtual;
  4246.           function LegalValue : Boolean; virtual;
  4247.           function Name : String; virtual;
  4248.           function Format(var FHash : TFormatHashTable;
  4249.             FormulasDisplayed : Boolean) : FormatType; virtual;
  4250.           function Width(var FHash : TFormatHashTable;
  4251.             FormulasDisplayed : Boolean) : Word; virtual;
  4252.           function Overwritten(var CHash : TCellHashTable;
  4253.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  4254.             var LastPos : CellPos; MaxCols : Word;
  4255.             GetColWidth : GetColWidthFunc;
  4256.             FormulasDisplayed : Boolean) : Word; virtual;
  4257.           function ShouldUpdate : Boolean; virtual;
  4258.           function HasError : Boolean; virtual;
  4259.           function CurrValue : Extended; virtual;
  4260.           function OverwriteStart(var FHash : TFormatHashTable;
  4261.             var WHash : TWidthHashTable; GetColWidth : GetColWidthFunc;
  4262.             EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  4263.           procedure EditString(MaxDecPlaces : Byte; var Input : String);      
  4264.         virtual;
  4265.           function DisplayString(FormulasDisplayed : Boolean;
  4266.             MaxDecPlaces : Byte) : String; virtual;
  4267.           function FormattedString(var OHash : TOverwriteHashTable;
  4268.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  4269.             GetColWidth : GetColWidthFunc; CPos : CellPos;
  4270.             FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  4271.             var CurrencyString : CurrencyStr; var ClType: CellTypes):
  4272.             String; virtual;
  4273.           function CopyString : String; virtual;
  4274.         end; {...TCell }
  4275.  
  4276.                                            52
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.    UNIT:
  4286.  
  4287.         GLCELL.PAS
  4288.  
  4289.    DESCRIPTION:
  4290.  
  4291.         This the main cell object.  You will never construct an instance of
  4292.         TCell itself;  rather you will use one or more of TCell's derived object
  4293.         types: TEmptyCell, TTextCell, TValueCell, TFormulaCell, TRepeatCell or
  4294.         create new derived object types.
  4295.  
  4296.    REMARKS:
  4297.  
  4298.         Most of TCell's methods are abstract methods.
  4299.  
  4300.  
  4301.    ************************************************************************
  4302.    TCell.CellType function
  4303.    ************************************************************************
  4304.    DECLARATION:
  4305.  
  4306.         function CellType : CellTypes; virtual;
  4307.  
  4308.    UNIT:
  4309.  
  4310.         GLCELL.PAS
  4311.  
  4312.    DESCRIPTION:
  4313.  
  4314.         Returns the type of the cell.  ABSTRACT METHOD.
  4315.  
  4316.    REMARKS:
  4317.  
  4318.         This function is used to determine what type of cell you are working
  4319.         with.  Each derived object type must override this method to return the
  4320.         aproppiate cell type when this function is called.
  4321.  
  4322.         (see CellTypes)
  4323.  
  4324.  
  4325.    ************************************************************************
  4326.    TCell.CopyString function
  4327.    ************************************************************************
  4328.    DECLARATION:
  4329.  
  4330.         function CopyString : String; virtual;
  4331.  
  4332.    UNIT:
  4333.  
  4334.         GLCELL.PAS
  4335.  
  4336.    DESCRIPTION:
  4337.  
  4338.         Returns a cell's string information.
  4339.  
  4340.    REMARKS:
  4341.  
  4342.         Every derived object type must override this method to return any string
  4343.  
  4344.                                            53
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.         information the cell stores.
  4354.  
  4355.         (see TCell.CurrValue)
  4356.  
  4357.  
  4358.    ************************************************************************
  4359.    TCell.CurrValue function
  4360.    ************************************************************************
  4361.    DECLARATION:
  4362.  
  4363.         function CurrValue : Extended; virtual;
  4364.  
  4365.    UNIT:
  4366.  
  4367.         GLCELL.PAS
  4368.  
  4369.    DESCRIPTION:
  4370.  
  4371.         Returns the current numeric value of a cell.  ABSTRACT METHOD.
  4372.  
  4373.    REMARKS:
  4374.  
  4375.         Every derived object type must override this method to return the
  4376.         correct current value of the cell when this function is called.
  4377.  
  4378.         (see TCell.CopyString)
  4379.  
  4380.  
  4381.    ************************************************************************
  4382.    TCell.DisplayString function
  4383.    ************************************************************************
  4384.    DECLARATION:
  4385.  
  4386.         function DisplayString(FormulasDisplayed : Boolean;
  4387.           MaxDecPlaces : Byte) : String; virtual;
  4388.  
  4389.    UNIT:
  4390.  
  4391.         GLCELL.PAS
  4392.  
  4393.    DESCRIPTION:
  4394.  
  4395.         Returns the string that will be displayed just above the input line. 
  4396.         ABSTRACT METHOD.
  4397.  
  4398.    PARAMETERS' DESCRIPTION:
  4399.  
  4400.         FormulasDisplayed : indicates if formulas (not their result) are being
  4401.                             displayed.
  4402.  
  4403.         MaxDecPlaces      : maximum number of decimal places that a number can
  4404.                             be displayed with.
  4405.  
  4406.    REMARKS:
  4407.  
  4408.         Every derived object type must override this method to create and return
  4409.         the string will the cell's contents, that will be displayed just above
  4410.         the input line.
  4411.  
  4412.                                            54
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.    ************************************************************************
  4423.    TCell.Done DESTRUCTOR
  4424.    ************************************************************************
  4425.    DECLARATION:
  4426.  
  4427.         destructor Done; virtual;
  4428.  
  4429.    UNIT:
  4430.  
  4431.         GLCELL.PAS
  4432.  
  4433.    DESCRIPTION:
  4434.  
  4435.         Performs the necessary cleanup and disposal of the cell object.
  4436.  
  4437.    ************************************************************************
  4438.    TCell.EditString procedure
  4439.    ************************************************************************
  4440.    DECLARATION:
  4441.  
  4442.         procedure EditString(MaxDecPlaces : Byte; var Input :
  4443.           String);  virtual;
  4444.  
  4445.    UNIT:
  4446.  
  4447.         GLCELL.PAS
  4448.  
  4449.    DESCRIPTION:
  4450.  
  4451.         Returns a string with the cell's contents.  ABSTRACT METHOD.
  4452.  
  4453.    PARAMETERS' DESCRIPTION:
  4454.  
  4455.         MaxDecPlaces : maximum number of decimal places that numbers can be
  4456.                        displayed with.
  4457.  
  4458.         Input        : parameter that will contain the string returned by this
  4459.                        procedure.
  4460.  
  4461.    REMARKS:
  4462.  
  4463.         Every derived object type must override this method to create and return
  4464.         a string with the cell's contents.
  4465.  
  4466.  
  4467.    ************************************************************************
  4468.    TCell.Format function
  4469.    ************************************************************************
  4470.    DECLARATION:
  4471.  
  4472.         function Format(var FHash : TFormatHashTable;
  4473.           FormulasDisplayed : Boolean) : FormatType; virtual;
  4474.  
  4475.    UNIT:
  4476.  
  4477.         GLCELL.PAS
  4478.  
  4479.  
  4480.                                          55
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.    DESCRIPTION:
  4490.  
  4491.         Returns the format value for the cell.  ABSTRACT METHOD.
  4492.  
  4493.    PARAMETERS' DESCRIPTION:
  4494.  
  4495.         FHash             :      a format hash table.
  4496.  
  4497.         FormulasDisplayed :      indicates if formulas (not their results) are
  4498.                                  being displayed, which affects the default
  4499.                                  format value for formula cells.
  4500.  
  4501.    REMARKS:
  4502.  
  4503.         Each derived object type must override this method to return the
  4504.         appropiate default format value for the cell, in case there is not a
  4505.         format value for the cell in the format hash table.
  4506.  
  4507.  
  4508.    ************************************************************************
  4509.    TCell.FormattedString function
  4510.    ************************************************************************
  4511.    DECLARATION:
  4512.  
  4513.         function FormattedString(var OHash : TOverwriteHashTable;
  4514.           var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  4515.           GetColWidth : GetColWidthFunc; CPos : CellPos;
  4516.           FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  4517.           var CurrencyString : CurrencyStr; var ClType: CellTypes):
  4518.           String; virtual;
  4519.  
  4520.    UNIT:
  4521.  
  4522.         GLCELL.PAS
  4523.  
  4524.    DESCRIPTION:
  4525.  
  4526.         Returns the formatted string that will be used to display the cell's
  4527.         contents in the spreadsheet.
  4528.  
  4529.    PARAMETERS' DESCRIPTION:
  4530.  
  4531.         OHash     :    an overwrite hash table; if an overwritten empty cell is
  4532.                        being displayed, the overwrite hash table is used to
  4533.                        determine which cell is overwriting the empty cell.
  4534.  
  4535.         FHash     :    a format hash table; used to determine the cell's format.
  4536.  
  4537.         WHash     :    a width hash table; used to determine the width of the of
  4538.                        the columns where the string will be displayed.
  4539.  
  4540.         GetColWidth :  function used to determine the width of a column.
  4541.  
  4542.         CPos        :  the position of the cell being displayed (used when
  4543.                        displaying overwritten empty cells).
  4544.  
  4545.         FormulasDisplayed : indicate if formulas (not their result) are being
  4546.                             displayed.
  4547.  
  4548.                                            56
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.         Start             : place in the cell's contents where the displayed
  4558.                             string must start (used when displaying overwritten
  4559.                             empty cells).
  4560.  
  4561.         ColWidth          : width of the column where the cell is being
  4562.                             displayed (used when displaying overwritten empty
  4563.                             cells).
  4564.  
  4565.         CurrencyString    : if the cell's contents should be displayed with a
  4566.                             currency character, it is returned in this
  4567.                             parameter.
  4568.  
  4569.         ClType            : used to determine the type of the cell being
  4570.                             displayed (used when displaying overwritten empty
  4571.                             cells).
  4572.  
  4573.    REMARKS:
  4574.  
  4575.         Every derived object type must override this method to create, format
  4576.         and return the appropiate string that will be used to display the cell's
  4577.         contents in the spreadsheet.
  4578.  
  4579.  
  4580.    ************************************************************************
  4581.    TCell.HashError function
  4582.    ************************************************************************
  4583.    DECLARATION:
  4584.  
  4585.         function HasError : Boolean; virtual;
  4586.  
  4587.    UNIT:
  4588.  
  4589.         GLCELL.PAS
  4590.  
  4591.    DESCRIPTION:
  4592.  
  4593.         Returns TRUE if the cell has a numeric error in it.  ABSTRACT METHOD.
  4594.  
  4595.    REMARKS:
  4596.  
  4597.         Every derived object type must override this method to return the
  4598.         appropiate boolean value when this function is called.
  4599.  
  4600.  
  4601.    ************************************************************************
  4602.    TCell.Init CONSTRUCTOR
  4603.    ************************************************************************
  4604.    DECLARATION:
  4605.  
  4606.         constructor Init(InitLoc : CellPos);
  4607.  
  4608.    UNIT:
  4609.  
  4610.         GLCELL.PAS
  4611.  
  4612.    DESCRIPTION:
  4613.  
  4614.         Creates and initializes the TCell object.
  4615.  
  4616.                                            57
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.    PARAMETERS' DESCRIPTION:
  4626.  
  4627.         InitLoc : the position the cell has in the spreadsheet.
  4628.  
  4629.    ************************************************************************
  4630.    TCell.LegalValue function
  4631.    ************************************************************************
  4632.    DECLARATION:
  4633.  
  4634.         function LegalValue : Boolean; virtual;
  4635.  
  4636.    UNIT:
  4637.  
  4638.         GLCELL.PAS
  4639.  
  4640.    DESCRIPTION:
  4641.  
  4642.         Returns TRUE if the cell has a legal numeric value.  ABSTRACT METHOD.
  4643.  
  4644.    REMARKS:
  4645.  
  4646.         Each derived object type must override this method to return the
  4647.         appropiate value when this function is called.
  4648.  
  4649.  
  4650.    ************************************************************************
  4651.    TCell.Loc field
  4652.    ************************************************************************
  4653.    DECLARATION:
  4654.  
  4655.         Loc : CellPos;
  4656.  
  4657.    UNIT:
  4658.  
  4659.         GLCELL.PAS
  4660.  
  4661.    DESCRIPTION:
  4662.  
  4663.         This is the position of the cell in the spreadsheet.
  4664.  
  4665.    ************************************************************************
  4666.    TCell.Name function
  4667.    ************************************************************************
  4668.    DECLARATION:
  4669.  
  4670.         function Name : String; virtual;
  4671.  
  4672.    UNIT:
  4673.  
  4674.         GLCELL.PAS
  4675.  
  4676.    DESCRIPTION:
  4677.  
  4678.         Returns a string with the name of the cell.  ABSTRACT METHOD.
  4679.  
  4680.    REMARKS:
  4681.  
  4682.         Each derived object type must override this method to return the
  4683.  
  4684.                                            58
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.         appropiate name for the cell when this function is called.
  4694.  
  4695.  
  4696.    ************************************************************************
  4697.    TCell.OverwriteStart function
  4698.    ************************************************************************
  4699.    DECLARATION:
  4700.  
  4701.         function OverwriteStart(var FHash : TFormatHashTable;
  4702.           var WHash : TWidthHashTable;  GetColWidth : GetColWidthFunc;
  4703.           EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  4704.  
  4705.    UNIT:
  4706.  
  4707.         GLCELL.PAS
  4708.  
  4709.    DESCRIPTION:
  4710.  
  4711.         Determines, for overwritten empty cells, where in the overwriten data
  4712.         they 
  4713.         they will start to display a value.  ABSTRACT METHOD.
  4714.  
  4715.    PARAMETERS' DESCRIPTION:
  4716.  
  4717.         FHash     :    a format hash table; used to determine the format of the
  4718.                        cell and therefore, the size of the cell's contents.
  4719.  
  4720.         WHash     :    a width hash table; used to determine the width of the
  4721.                        columns where the data is being displayed.
  4722.  
  4723.         GetColWidth :  function used to determine the width of a column (see
  4724.                        GetColWidth).
  4725.  
  4726.         EndCol      :  column where the overwritten data will be displayed.
  4727.  
  4728.         DisplayFormulas :   indicates if formulas (not their results) are being
  4729.                             displayed.
  4730.  
  4731.    REMARKS:
  4732.  
  4733.         Every derived object type must override this method to return the
  4734.         correct place of the overwriting data where empty overwritten cells will
  4735.         start displaying the data.
  4736.  
  4737.  
  4738.    ************************************************************************
  4739.    TCell.Overwritten function
  4740.    ************************************************************************
  4741.    DECLARATION:
  4742.  
  4743.         function Overwritten(var CHash : TCellHashTable;
  4744.           var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  4745.           var LastPos : CellPos; MaxCols : Word;
  4746.           GetColWidth : GetColWidthFunc; FormulasDisplayed : Boolean) :
  4747.           Word; virtual;
  4748.  
  4749.    UNIT:
  4750.  
  4751.         GLCELL.PAS
  4752.  
  4753.                                          59
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.    DESCRIPTION:
  4763.  
  4764.         Calculates how many empty cells the cell will overwrite.  ABSTRACT
  4765.         METHOD.
  4766.  
  4767.    PARAMETERS' DESCRIPTION:
  4768.  
  4769.         CHash       :  a cell hash table; used to determine if there is a non-
  4770.                        empty cell near, which may affect the number of cells the
  4771.                        cell will overwrite.
  4772.  
  4773.         WHash       :  a width hash table; used to determine the width of the
  4774.                        columns where the cell is being displayed, which affects
  4775.                        how many cells the cell will overwrite.
  4776.  
  4777.         FHash       :  a format hash table; used to determine the format of the
  4778.                        cell, which may affect how many cells it will overwrite.
  4779.  
  4780.         LastPos     :  the lower right corner of the block of cells in the
  4781.                        spreadsheet actually used.
  4782.  
  4783.         MaxCols     :  maximum number of columns in the spreadsheet.
  4784.  
  4785.         GetColWidth :  a function used to determine the width of a column (see
  4786.                        GetColWidth).
  4787.  
  4788.         FormulasDisplayed : indicates if formulas (not their results) are being
  4789.                             displayed, which affects how many cells a formula
  4790.                             cell may overwrite.
  4791.  
  4792.    REMARKS:
  4793.  
  4794.         Each derived object type must override this method to return the correct
  4795.         number of cells the cell will overwrite.
  4796.  
  4797.  
  4798.    ************************************************************************
  4799.    TCell.ShouldUpdate function
  4800.    ************************************************************************
  4801.    DECLARATION:
  4802.  
  4803.         function ShouldUpdate : Boolean; virtual;
  4804.  
  4805.    UNIT:
  4806.  
  4807.         GLCELL.PAS
  4808.  
  4809.    DESCRIPTION:
  4810.  
  4811.         Returns TRUE if the cell needs to be udpated when the spreadsheet
  4812.         changes.  ABSTRACT METHOD.
  4813.  
  4814.    REMARKS:
  4815.  
  4816.         Every derived object type must override this method to return the
  4817.         appropiate boolean value according to the nature of the cell's contents.
  4818.  
  4819.  
  4820.  
  4821.                                          60
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.    ************************************************************************
  4831.    TCell.Width function
  4832.    ************************************************************************
  4833.    DECLARATION:
  4834.  
  4835.         function Width(var FHash : TFormatHashTable;
  4836.           FormulasDisplayed : Boolean) : Word; virtual;
  4837.  
  4838.    UNIT:
  4839.  
  4840.         GLCELL.PAS
  4841.  
  4842.    DESCRIPTION:
  4843.  
  4844.         Returns the width of a cell (including the cells it will overwrite). 
  4845.         ABSTRACT METHOD.
  4846.  
  4847.    PARAMETERS' DESCRIPTION:
  4848.  
  4849.         FHash             :      a format hash table.
  4850.  
  4851.         FormulasDisplayed :      indicates if formulas (not their results) are
  4852.                                  being displayed, which affects the the width of
  4853.                                  formula cells.
  4854.  
  4855.    REMARKS:
  4856.  
  4857.         Each derived object type must override this method to return the correct
  4858.         width of the cell.
  4859.  
  4860.  
  4861.    ************************************************************************
  4862.    TCellHashTable object
  4863.    ************************************************************************
  4864.    DECLARATION:
  4865.  
  4866.         TCellHashTable = OBJECT(THashTable)
  4867.             CurrCell : PCell;
  4868.             CurrLoc : CellPos;
  4869.           constructor Init(InitBuckets : BucketRange);
  4870.           destructor Done;
  4871.           function Add(ACell : PCell) : Boolean;
  4872.           procedure Delete(DelLoc : CellPos; var DeletedCell : PCell);
  4873.           function Search(SPos : CellPos) : PCell;
  4874.           function HashValue : LongInt; virtual;
  4875.           function Found(Item : HashItemPtr) : Boolean; virtual;
  4876.           procedure CreateItem(var Item : HashItemPtr); virtual;
  4877.           function ItemSize : HashItemSizeRange; virtual;
  4878.           procedure Load(var S : TStream; Total : Longint;
  4879.             AdjustAfter: CellPos; RowAdjustment, ColAdjustment: Integer);
  4880.           procedure Store(var S : TStream);
  4881.           function FirstItem : PCell;
  4882.           function NextItem : PCell;
  4883.         end; {...TCellHashTable }
  4884.  
  4885.    UNIT:
  4886.  
  4887.         GLCELL.PAS
  4888.  
  4889.                                          61
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.  
  4897.  
  4898.    DESCRIPTION:
  4899.  
  4900.         TCellHashTable stores pointers to all the cells in a spreadsheet.
  4901.  
  4902.    ************************************************************************
  4903.    TCellHashTable.Add function
  4904.    ************************************************************************
  4905.    DECLARATION:
  4906.  
  4907.         function Add(ACell : PCell) : Boolean;
  4908.  
  4909.    UNIT:
  4910.  
  4911.         GLCELL.PAS
  4912.  
  4913.    DESCRIPTION:
  4914.  
  4915.         Adds a cell to the hash table.
  4916.  
  4917.    PARAMETERS' DESCRIPTION:
  4918.  
  4919.         ACell : cell pointer that will be added to the hash table.
  4920.  
  4921.    ************************************************************************
  4922.    TCellHashTable.CreateItem procedure
  4923.    ************************************************************************
  4924.    DECLARATION:
  4925.  
  4926.         procedure CreateItem(var Item : HashItemPtr); virtual;
  4927.  
  4928.    UNIT:
  4929.  
  4930.         GLCELL.PAS
  4931.  
  4932.    DESCRIPTION:
  4933.  
  4934.         Creates a HashItem and puts in it the information to be stored (in this
  4935.         case, a cell pointer).
  4936.  
  4937.    PARAMETERS' DESCRIPTION:
  4938.  
  4939.         Item : pointer to the HashItem created. 
  4940.  
  4941.    REMARKS:
  4942.  
  4943.         You will never need to call this method directly.
  4944.  
  4945.         (see TCellHashTable.Init)
  4946.  
  4947.  
  4948.    ************************************************************************
  4949.    TCellHashTable.CurrCell field
  4950.    ************************************************************************
  4951.    DECLARATION:
  4952.  
  4953.         CurrCell : PCell;
  4954.  
  4955.  
  4956.  
  4957.                                          62
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.    UNIT:
  4967.  
  4968.         GLCELL.PAS
  4969.  
  4970.    DESCRIPTION:
  4971.  
  4972.         Stores a pointer to the cell being added, searched for or deleted from
  4973.         the hash table.
  4974.  
  4975.    REMARKS:
  4976.  
  4977.         You will never need to access this field directly.
  4978.  
  4979.  
  4980.    ************************************************************************
  4981.    TCellHashTable.CurrLoc field
  4982.    ************************************************************************
  4983.    DECLARATION:
  4984.  
  4985.         CurrLoc : CellPos;
  4986.  
  4987.    UNIT:
  4988.  
  4989.         GLCELL.PAS
  4990.  
  4991.    DESCRIPTION:
  4992.  
  4993.         Stores the location of the cell being added, searched for or deleted
  4994.         from the hash table.
  4995.  
  4996.    REMARKS:
  4997.  
  4998.         You will never need to access this field directly.
  4999.  
  5000.  
  5001.    ************************************************************************
  5002.    TCellHashTable.Delete procedure
  5003.    ************************************************************************
  5004.    DECLARATION:
  5005.  
  5006.         procedure Delete(DelLoc : CellPos; var DeletedCell : PCell);
  5007.  
  5008.    UNIT:
  5009.  
  5010.         GLCELL.PAS
  5011.  
  5012.    DESCRIPTION:
  5013.  
  5014.         Deletes a cell from the hash table.
  5015.  
  5016.    PARAMETERS' DESCRIPTION:
  5017.  
  5018.         DelLoc         :    It is the position in the spreadsheet of the cell to
  5019.                             be deleted.
  5020.  
  5021.         DeletedCell    :    After deleting the cell from the hash table, a
  5022.                             pointer to cell object is returned in the
  5023.                             DeletedCell parameter (or NIL if the item is not
  5024.  
  5025.                                            63
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.                             found).
  5035.  
  5036.    REMARKS:
  5037.  
  5038.  
  5039.         If you call TCellHashTable.Delete directly, be sure to dispose the
  5040.         deleted cell object when you no longer need it.
  5041.  
  5042.  
  5043.    ************************************************************************
  5044.    TCellHashTable.Done DESTRUCTOR
  5045.    ************************************************************************
  5046.    DECLARATION:
  5047.  
  5048.         destructor Done;
  5049.  
  5050.    UNIT:
  5051.  
  5052.         GLCELL.PAS
  5053.  
  5054.    DESCRIPTION:
  5055.  
  5056.         Performs the necessary cleanup and disposal of the cell hash table.
  5057.  
  5058.    ************************************************************************
  5059.    TCellHashTable.FirstItem function
  5060.    ************************************************************************
  5061.    DECLARATION:
  5062.  
  5063.         function FirstItem : PCell;
  5064.  
  5065.    UNIT:
  5066.  
  5067.         GLCELL.PAS
  5068.  
  5069.    DESCRIPTION:
  5070.  
  5071.         Returns the first HashItem (cell pointer) in a cell hash table.
  5072.  
  5073.    REMARKS:
  5074.  
  5075.         To find all the items in a hash table, call FirstItem to get the first
  5076.         one and then call NextItem to get the rest.
  5077.  
  5078.  
  5079.    ************************************************************************
  5080.    TCellHashTable.Found function
  5081.    ************************************************************************
  5082.    DECLARATION:
  5083.  
  5084.         function Found(Item : HashItemPtr) : Boolean; virtual;
  5085.  
  5086.    UNIT:
  5087.  
  5088.         GLCELL.PAS
  5089.  
  5090.  
  5091.  
  5092.  
  5093.                                          64
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.  
  5102.    DESCRIPTION:
  5103.  
  5104.         This function is called by TCellHashTable.Search.  It returns a Boolean
  5105.         value indicating whether the current HashItem is the one being searched
  5106.         for.
  5107.  
  5108.  
  5109.    PARAMETERS' DESCRIPTION:
  5110.  
  5111.         Item : is a pointer to a HashItem in the hash table.
  5112.  
  5113.    REMARKS:
  5114.  
  5115.         You will never need to call this method directly.
  5116.  
  5117.  
  5118.    ************************************************************************
  5119.    TCellHashTable.HashValue function
  5120.    ************************************************************************
  5121.    DECLARATION:
  5122.  
  5123.         function HashValue : LongInt; virtual;
  5124.  
  5125.    UNIT:
  5126.  
  5127.         GLCELL.PAS
  5128.  
  5129.    DESCRIPTION:
  5130.  
  5131.         Returns a number that is used to determine the number of the bucket a
  5132.         HashItem should be put in.
  5133.  
  5134.    REMARKS:
  5135.  
  5136.         This function is also used to search for a HashItem a hash table.  The
  5137.         linked list (bucket) in which a HashItem is located is determined using
  5138.         the value returned by the HashValue function; then a sequential search
  5139.         is performed in the list until TCellHashTable.Found returns TRUE.
  5140.  
  5141.         All cells with the same HashValue are placed in the same bucket.
  5142.  
  5143.  
  5144.    ************************************************************************
  5145.    TCellHashTable.Init CONSTRUCTOR
  5146.    ************************************************************************
  5147.    DECLARATION:
  5148.  
  5149.         constructor Init(InitBuckets: BucketRange);
  5150.  
  5151.    UNIT:
  5152.  
  5153.         GLCELL.PAS
  5154.  
  5155.    DESCRIPTION:
  5156.  
  5157.         Creates and initializes the TCellHashTable object.
  5158.  
  5159.  
  5160.  
  5161.                                          65
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.    PARAMETERS' DESCRIPTION:
  5171.  
  5172.         InitBuckets: The number of buckets the hash table will have.
  5173.  
  5174.    REMARKS:
  5175.  
  5176.         DEFINITION: A bucket is a linked list of HashItems that have the same
  5177.         hash value.
  5178.  
  5179.         DEFINITION: A HashItem is a data structure used to store information in
  5180.         the hash table.  A HashItem is created by the CreateItem procedure.
  5181.  
  5182.         (see TCHASH.INT, THashTable.Add, TCellHashTable,
  5183.         TCellHashTable.HashValue)
  5184.  
  5185.  
  5186.    ************************************************************************
  5187.    TCellHashTable.ItemSize function
  5188.    ************************************************************************
  5189.    DECLARATION:
  5190.  
  5191.         function ItemSize : HashItemSizeRange; virtual;
  5192.  
  5193.    UNIT:
  5194.  
  5195.         GLCELL.PAS
  5196.  
  5197.    DESCRIPTION:
  5198.  
  5199.         Returns the size of a HashItem.
  5200.  
  5201.    REMARKS:
  5202.  
  5203.         The size of the HashItem depends on the information to be stored.
  5204.  
  5205.         You will never need to call this method directly.
  5206.  
  5207.  
  5208.    ************************************************************************
  5209.    TCellHashTable.Load procedure
  5210.    ************************************************************************
  5211.    DECLARATION:
  5212.  
  5213.         procedure Load(var S : TStream; Total : Longint;
  5214.           AdjustAfter: CellPos; RowAdjustment, ColAdjustment: Integer);
  5215.  
  5216.    UNIT:
  5217.  
  5218.         GLCELL.PAS
  5219.  
  5220.    DESCRIPTION:
  5221.  
  5222.         Loads a cell hash table from disk.
  5223.  
  5224.    PARAMETERS' DESCRIPTION:
  5225.  
  5226.         S              :    the stream from which the cell hash table will be
  5227.                             loaded.
  5228.  
  5229.                                            66
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.         Total          :    the total number of HashItems (cell pointers) that
  5240.                             will be loaded from the stream.
  5241.  
  5242.         AdjustAfter    :    The location of all cells below and to the left of
  5243.                             this position, will be increased by RowAdjustment
  5244.                             and ColAdjustment respectively.
  5245.  
  5246.         RowAdjustment  :    the row location of all cells below AdjustAfter will
  5247.                             be increased by this amount.
  5248.  
  5249.         ColAdjustment  :    the column location of all cells to the left of
  5250.                             AdjustAfter will be increased by this amount.
  5251.  
  5252.    REMARKS:
  5253.  
  5254.         The AdjustAfter, RowAdjustment and ColAdjustment parameters are used to
  5255.         relocate the cells in the cell hash table, when adding or deleting rows
  5256.         or columns.
  5257.  
  5258.         (see TSpreadSheet.InsertColumns, TSpreadSheet.InsertRows,
  5259.         TSpreadSheet.DeleteColumns, TSpreadSheet.DeleteRows)
  5260.  
  5261.  
  5262.    ************************************************************************
  5263.    TCellHashTable.NextItem function
  5264.    ************************************************************************
  5265.    DECLARATION:
  5266.  
  5267.         function NextItem : PCell;
  5268.  
  5269.    UNIT:
  5270.  
  5271.         GLCELL.PAS
  5272.  
  5273.    DESCRIPTION:
  5274.  
  5275.         Returns the second and subsequent HashItems in a cell hash table.
  5276.  
  5277.    REMARKS:
  5278.  
  5279.         (see TCellHashTable.FirstItem)
  5280.  
  5281.  
  5282.    ************************************************************************
  5283.    TCellHashTable.Search function
  5284.    ************************************************************************
  5285.    DECLARATION:
  5286.  
  5287.         function Search(SPos : CellPos) : PCell;
  5288.  
  5289.    UNIT:
  5290.  
  5291.         GLCELL.PAS
  5292.  
  5293.    DESCRIPTION:
  5294.  
  5295.         Searches for a cell in the spreadsheet; it returns a pointer to the cell
  5296.  
  5297.                                            67
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.         if it was found, or a pointer to an empty cell otherwise.
  5307.  
  5308.    PARAMETERS' DESCRIPTION:
  5309.  
  5310.         SPos : the cell's position in the spreadsheet.
  5311.  
  5312.    REMARKS:
  5313.  
  5314.         (see TCellHashTable.Found)
  5315.  
  5316.  
  5317.    ************************************************************************
  5318.    TCellHashTable.Store procedure
  5319.    ************************************************************************
  5320.    DECLARATION:
  5321.  
  5322.         procedure Store(var S : TStream);
  5323.  
  5324.    UNIT:
  5325.  
  5326.         GLCELL.PAS
  5327.  
  5328.    DESCRIPTION:
  5329.  
  5330.         Writes a cell hash table to disk.
  5331.  
  5332.    PARAMETERS' DESCRIPTION:
  5333.  
  5334.         S : the stream to which the cell hash table will be written.
  5335.  
  5336.    ************************************************************************
  5337.    TEmptyCell object
  5338.    ************************************************************************
  5339.    DECLARATION:
  5340.  
  5341.         TEmptyCell = object(TCell)
  5342.           constructor Init;
  5343.           function CellType : CellTypes; virtual;
  5344.           function LegalValue : Boolean; virtual;
  5345.           function Name : String; virtual;
  5346.           function Format(var FHash : TFormatHashTable;
  5347.             FormulasDisplayed : Boolean) : FormatType; virtual;
  5348.           function Width(var FHash : TFormatHashTable;
  5349.             FormulasDisplayed : Boolean) : Word; virtual;
  5350.           function Overwritten(var CHash : TCellHashTable;
  5351.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  5352.             var LastPos : CellPos; MaxCols : Word;
  5353.             GetColWidth : GetColWidthFunc; FormulasDisplayed : Boolean) :
  5354.             Word; virtual;
  5355.           function ShouldUpdate : Boolean; virtual;
  5356.           function HasError : Boolean; virtual;
  5357.           function CurrValue : Extended; virtual;
  5358.           function OverwriteStart(var FHash : TFormatHashTable;
  5359.             var WHash : TWidthHashTable; GetColWidth : GetColWidthFunc;
  5360.             EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  5361.           procedure EditString(MaxDecPlaces : Byte; var Input : String);
  5362.             virtual;
  5363.           function DisplayString(FormulasDisplayed : Boolean;
  5364.  
  5365.                                            68
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.             MaxDecPlaces : Byte) : String; virtual;
  5375.           function FormattedString(var OHash : TOverwriteHashTable;
  5376.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  5377.             GetColWidth : GetColWidthFunc; CPos : CellPos;
  5378.             FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  5379.             var CurrencyString : CurrencyStr; var ClType: CellTypes):
  5380.             String; virtual;
  5381.           function CopyString : String; virtual;
  5382.         end; {..TEmptyCell }
  5383.  
  5384.    UNIT:
  5385.  
  5386.         GLCELL.PAS
  5387.  
  5388.    DESCRIPTION:
  5389.  
  5390.         A TCell's descendant that is used to display all empty and/or
  5391.         overwritten cells.  Only one instance is TEmptyCell needs to be
  5392.         constructed.
  5393.  
  5394.    REMARKS:
  5395.  
  5396.         (see Empty, TCell)
  5397.  
  5398.  
  5399.    ************************************************************************
  5400.    TEmptyCell.CellType function
  5401.    ************************************************************************
  5402.    DECLARATION:
  5403.  
  5404.         (see TCell.CellType)
  5405.  
  5406.    UNIT:
  5407.  
  5408.         GLCELL.PAS
  5409.  
  5410.    ************************************************************************
  5411.    TEmptyCell.CopyString function
  5412.    ************************************************************************
  5413.    DECLARATION:
  5414.  
  5415.         (see TCell.CopyString)
  5416.  
  5417.    UNIT:
  5418.  
  5419.         GLCELL.PAS
  5420.  
  5421.    REMARKS:
  5422.  
  5423.         This function always returns an empty string.
  5424.  
  5425.  
  5426.    ************************************************************************
  5427.    TEmptyCell.CurrValue function
  5428.    ************************************************************************
  5429.    DECLARATION:
  5430.  
  5431.         (see TCell.CurrValue)
  5432.  
  5433.                                            69
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.    UNIT:
  5443.  
  5444.         GLCELL.PAS
  5445.  
  5446.    REMARKS:
  5447.  
  5448.         This function always returns 0.
  5449.  
  5450.  
  5451.    ************************************************************************
  5452.    TEmptyCell.DisplayString function
  5453.    ************************************************************************
  5454.    DECLARATION:
  5455.  
  5456.         (see TCell.DisplayString)
  5457.  
  5458.    UNIT:
  5459.  
  5460.         GLCELL.PAS
  5461.  
  5462.    REMARKS:
  5463.  
  5464.         This function always returns an empty string.
  5465.  
  5466.  
  5467.    ************************************************************************
  5468.    TEmptyCell.EditString procedure
  5469.    ************************************************************************
  5470.    DECLARATION:
  5471.  
  5472.         (see TCell.EditString)
  5473.  
  5474.    UNIT:
  5475.  
  5476.         GLCELL.PAS
  5477.  
  5478.    REMARKS:
  5479.  
  5480.         This procedure always returns an empty string in the input parameter.
  5481.  
  5482.  
  5483.    ************************************************************************
  5484.    TEmptyCell.Format function
  5485.    ************************************************************************
  5486.    DECLARATION:
  5487.  
  5488.         (see TCell.Format)
  5489.  
  5490.    UNIT:
  5491.  
  5492.         GLCELL.PAS
  5493.  
  5494.    REMARKS:
  5495.  
  5496.         This function always returns 0 since there is no point in formatting an
  5497.         empty cell.
  5498.  
  5499.  
  5500.  
  5501.                                          70
  5502.  
  5503.  
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.  
  5510.    ************************************************************************
  5511.    TEmptyCell.FormattedString function
  5512.    ************************************************************************
  5513.    DECLARATION:
  5514.  
  5515.         (see TCell.FormattedString)
  5516.  
  5517.    UNIT:
  5518.  
  5519.         GLCELL.PAS
  5520.  
  5521.    REMARKS:
  5522.  
  5523.         This functions checks if the cell is overwritten by another cell.  If
  5524.         true, it returns the portion of the other cell's data that overwrites
  5525.         the empty cell.  If the empty cell is not overwritten by another cell,
  5526.         it returns an empty string.
  5527.  
  5528.  
  5529.    ************************************************************************
  5530.    TEmptyCell.HasError function
  5531.    ************************************************************************
  5532.    DECLARATION:
  5533.  
  5534.         (see TCell.HasError)
  5535.  
  5536.    UNIT:
  5537.  
  5538.         GLCELL.PAS
  5539.  
  5540.    REMARKS:
  5541.  
  5542.         This function always returns FALSE.
  5543.  
  5544.  
  5545.    ************************************************************************
  5546.    TEmptyCell.Init CONSTRUCTOR
  5547.    ************************************************************************
  5548.    DECLARATION:
  5549.  
  5550.         constructor Init;
  5551.  
  5552.    UNIT:
  5553.  
  5554.         GLCELL.PAS
  5555.  
  5556.    DESCRIPTION:
  5557.  
  5558.         Creates and initializes the TEmptyCell object.
  5559.  
  5560.    ************************************************************************
  5561.    TEmptyCell.LegalValue function
  5562.    ************************************************************************
  5563.    DECLARATION:
  5564.  
  5565.         (see TCell.LegalValue)
  5566.  
  5567.  
  5568.  
  5569.                                          71
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.    UNIT:
  5579.  
  5580.         GLCELL.PAS
  5581.  
  5582.    REMARKS:
  5583.  
  5584.         This function always returns TRUE.
  5585.  
  5586.  
  5587.    ************************************************************************
  5588.    TEmptyCell.Name function
  5589.    ************************************************************************
  5590.    DECLARATION:
  5591.  
  5592.         (see TCell.Name)
  5593.  
  5594.    UNIT:
  5595.  
  5596.         GLCELL.PAS
  5597.  
  5598.    ************************************************************************
  5599.    TEmptyCell.OverwriteStart function
  5600.    ************************************************************************
  5601.    DECLARATION:
  5602.  
  5603.         (see TCell.OverwriteStart)
  5604.  
  5605.    UNIT:
  5606.  
  5607.         GLCELL.PAS
  5608.  
  5609.    REMARKS:
  5610.  
  5611.         This function always returns 1.
  5612.  
  5613.  
  5614.    ************************************************************************
  5615.    TEmptyCell.Overwritten function
  5616.    ************************************************************************
  5617.    DECLARATION:
  5618.  
  5619.         (see TCell.Overwritten)
  5620.  
  5621.    UNIT:
  5622.  
  5623.         GLCELL.PAS
  5624.  
  5625.    REMARKS:
  5626.  
  5627.         This function always returns 0.
  5628.  
  5629.  
  5630.    ************************************************************************
  5631.    TEmptyCell.ShouldUpdate function
  5632.    ************************************************************************
  5633.    DECLARATION:
  5634.  
  5635.         (see TCell.ShouldUpdate)
  5636.  
  5637.                                            72
  5638.  
  5639.  
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.    UNIT:
  5647.  
  5648.         GLCELL.PAS
  5649.  
  5650.    REMARKS:
  5651.  
  5652.         This function always returns FALSE.
  5653.  
  5654.  
  5655.    ************************************************************************
  5656.    TEmptyCell.Width function
  5657.    ************************************************************************
  5658.    DECLARATION:
  5659.  
  5660.         (see TCell.Width)
  5661.  
  5662.    UNIT:
  5663.  
  5664.         GLCELL.PAS
  5665.  
  5666.    REMARKS:
  5667.  
  5668.         This function always returns 0.
  5669.  
  5670.  
  5671.    ************************************************************************
  5672.    TFormatHashTable object
  5673.    ************************************************************************
  5674.    DECLARATION:
  5675.  
  5676.         TFormatHashTable = OBJECT(THashTable)
  5677.             CurrStart,
  5678.             CurrStop : CellPos;
  5679.             CurrFormat : FormatType;
  5680.           constructor Init;
  5681.           destructor Done;
  5682.           function Overwrite(NewStart, NewStop : CellPos) : Boolean;
  5683.           function Add(NewStart, NewStop : CellPos;
  5684.             NewFormat : FormatType) : Boolean;
  5685.           function Delete(DStart, DStop : CellPos) : Boolean;
  5686.           function Search(SPos : CellPos; var F : FormatType) : Boolean;
  5687.           function HashValue : LongInt; virtual;
  5688.           function Found(Item : HashItemPtr) : Boolean; virtual;
  5689.           procedure CreateItem(var Item : HashItemPtr); virtual;
  5690.           function ItemSize : HashItemSizeRange; virtual;
  5691.           procedure Load(var S : TStream; Total : Longint);
  5692.           procedure Store(var S : TStream);
  5693.         end; {...TFormatHashTable }
  5694.  
  5695.    UNIT:
  5696.  
  5697.         GLCELL.PAS
  5698.  
  5699.    DESCRIPTION:
  5700.  
  5701.         Used to store information about areas formatted with a format that
  5702.         differs from the default.
  5703.  
  5704.  
  5705.                                          73
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.    REMARKS:
  5715.  
  5716.         The area and the format are stored in the hash table.
  5717.  
  5718.  
  5719.    ************************************************************************
  5720.    TFormatHashTable.Add function
  5721.    ************************************************************************
  5722.    DECLARATION:
  5723.  
  5724.         function Add(NewStart, NewStop : CellPos;
  5725.           NewFormat : FormatType) : Boolean;
  5726.  
  5727.    UNIT:
  5728.  
  5729.         GLCELL.PAS
  5730.  
  5731.    DESCRIPTION:
  5732.  
  5733.         Adds a new formatted area to the format hash table.
  5734.  
  5735.    PARAMETERS' DESCRIPTION:
  5736.  
  5737.         NewStart  :    Upper left corner of the area being added to the format
  5738.                        hash table.
  5739.  
  5740.         NewStop   :    Lower right corner of the area being added to the format
  5741.                        hash table.
  5742.  
  5743.         NewFormat :    Format value assigned to the area being added to the
  5744.                        format hash table.
  5745.  
  5746.    REMARKS:
  5747.  
  5748.         Add will return TRUE if the cell was successfully added; FALSE
  5749.         otherwise.
  5750.  
  5751.         (see TFormatHashTable.Overwrite, THashTable.Add)
  5752.  
  5753.  
  5754.    ************************************************************************
  5755.    TFormatHashTable.CreateItem procedure
  5756.    ************************************************************************
  5757.    DECLARATION:
  5758.  
  5759.         (see TCellHashTable.CreateItem)
  5760.  
  5761.    UNIT:
  5762.  
  5763.         GLCELL.PAS
  5764.  
  5765.    ************************************************************************
  5766.    TFormatHashTable.CurrFormat field
  5767.    ************************************************************************
  5768.    DECLARATION:
  5769.  
  5770.         CurrFormat : FormatType;
  5771.  
  5772.  
  5773.                                          74
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.    UNIT:
  5783.  
  5784.         GLCELL.PAS
  5785.  
  5786.    DESCRIPTION:
  5787.  
  5788.         Stores the format value being added or searched for -- if found --.
  5789.  
  5790.    REMARKS:
  5791.  
  5792.         You will never need to access this field directly.
  5793.  
  5794.  
  5795.    ************************************************************************
  5796.    TFormatHashTable.CurrStart field
  5797.    ************************************************************************
  5798.    DECLARATION:
  5799.  
  5800.         CurrStart : CellPos;
  5801.  
  5802.    UNIT:
  5803.  
  5804.         GLCELL.PAS
  5805.  
  5806.    DESCRIPTION:
  5807.  
  5808.         Stores the location in the spreadsheet of the upper left corner of the
  5809.         block (area) of cells that is being added to the hash table;  also used
  5810.         by the Search function to store the position of the cell for which a
  5811.         format is being searched.
  5812.  
  5813.    REMARKS:
  5814.  
  5815.         You will never need to access this field directly.
  5816.  
  5817.         (see TFormatHashTable.CurrStop, TFormatHashTable.CurrFormat,
  5818.         TFormatHashTable.Search)
  5819.  
  5820.  
  5821.    ************************************************************************
  5822.    TFormatHashTable.CurrStop field
  5823.    ************************************************************************
  5824.    DECLARATION:
  5825.  
  5826.         CurrStop : CellPos;
  5827.  
  5828.    UNIT:
  5829.  
  5830.         GLCELL.PAS
  5831.  
  5832.    DESCRIPTION:
  5833.  
  5834.         Stores the location in the spreadsheet of the lower right corner of the
  5835.         block (area) of cells being added to the hash table. 
  5836.  
  5837.    REMARKS:
  5838.  
  5839.         You will never need to access this field directly.
  5840.  
  5841.                                            75
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.         (see TFormatHashTable.CurrStart, TFormatHashTable.CurrFormat)
  5851.  
  5852.  
  5853.    ************************************************************************
  5854.    TFormatHashTable.Delete function
  5855.    ************************************************************************
  5856.    DECLARATION:
  5857.  
  5858.         function Delete(DStart, DStop : CellPos) : Boolean;
  5859.  
  5860.    UNIT:
  5861.  
  5862.         GLCELL.PAS
  5863.  
  5864.    DESCRIPTION:
  5865.  
  5866.         Deletes an area from the hash table.
  5867.  
  5868.    PARAMETERS' DESCRIPTION:
  5869.  
  5870.         DStart    :    Upper left corner of the area to be deleted.
  5871.  
  5872.         DStop     :    Lower right corner of the area to be deleted.
  5873.  
  5874.    REMARKS:
  5875.  
  5876.         This function returns TRUE if the operation was completed successfully. 
  5877.         However, this does not mean that the area actually existed in the hash
  5878.         table.
  5879.  
  5880.         The area that is being deleted can be any area; it does not have to be
  5881.         exactly one of the areas added to the hash table with the Add function.
  5882.  
  5883.  
  5884.    ************************************************************************
  5885.    TFormatHashTable.Done DESTRUCTOR
  5886.    ************************************************************************
  5887.    DECLARATION:
  5888.  
  5889.         destructor Done;
  5890.  
  5891.    UNIT:
  5892.  
  5893.         GLCELL.PAS
  5894.  
  5895.    DESCRIPTION:
  5896.  
  5897.         Performs the necessary cleanup and disposal of the format hash table.
  5898.  
  5899.    ************************************************************************
  5900.    TFormatHashTable.Found function
  5901.    ************************************************************************
  5902.    DECLARATION:
  5903.  
  5904.         (see TCellHashTable.Found)
  5905.  
  5906.  
  5907.  
  5908.  
  5909.                                          76
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.    UNIT:
  5919.  
  5920.         GLCELL.PAS
  5921.  
  5922.    ************************************************************************
  5923.    TFormatHashTable.HashValue function
  5924.    ************************************************************************
  5925.    DECLARATION:
  5926.  
  5927.         (see TCellHashTable.HashValue)
  5928.  
  5929.    UNIT:
  5930.  
  5931.         GLCELL.PAS
  5932.  
  5933.    ************************************************************************
  5934.    TFormatHashTable.Init CONSTRUCTOR
  5935.    ************************************************************************
  5936.    DECLARATION:
  5937.  
  5938.         constructor Init;
  5939.  
  5940.    UNIT:
  5941.  
  5942.         GLCELL.PAS
  5943.  
  5944.    DESCRIPTION:
  5945.  
  5946.         Creates and initializes the TFormatHashTable object.
  5947.  
  5948.    REMARKS:
  5949.  
  5950.         (see TFormatHashTable)
  5951.  
  5952.  
  5953.    ************************************************************************
  5954.    TFormatHashTable.ItemSize function
  5955.    ************************************************************************
  5956.    DECLARATION:
  5957.  
  5958.         (see TCellHashTable.ItemSize)
  5959.  
  5960.    UNIT:
  5961.  
  5962.         GLCELL.PAS
  5963.  
  5964.    ************************************************************************
  5965.    TFormatHashTable.Load procedure
  5966.    ************************************************************************
  5967.    DECLARATION:
  5968.  
  5969.         procedure Load(var S : TStream; Total : Longint);
  5970.  
  5971.    UNIT:
  5972.  
  5973.         GLCELL.PAS
  5974.  
  5975.  
  5976.  
  5977.                                          77
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.    DESCRIPTION:
  5987.  
  5988.         Loads a format hash table from disk.
  5989.  
  5990.    PARAMETERS' DESCRIPTION:
  5991.  
  5992.         S     :   the stream from which the format hash table will be loaded.
  5993.  
  5994.         Total :   the total number of HashItems that will be loaded from the
  5995.                   stream.
  5996.  
  5997.    ************************************************************************
  5998.    TFormatHashTable.Overwrite function
  5999.    ************************************************************************
  6000.    DECLARATION:
  6001.  
  6002.         function Overwrite(NewStart, NewStop : CellPos) : Boolean;
  6003.  
  6004.    UNIT:
  6005.  
  6006.         GLCELL.PAS
  6007.  
  6008.    DESCRIPTION:
  6009.  
  6010.         Checks to see if a new area has overwritten an old one, requiring the
  6011.         old area to be completely overwritten or broken into parts.
  6012.  
  6013.    PARAMETERS' DESCRIPTION:
  6014.  
  6015.         NewStart :     Upper left corner of the new area being added to the hash
  6016.                        table.
  6017.  
  6018.         NewStop  :     Lower right corner of the new area being added to the
  6019.                        hash table.
  6020.  
  6021.    REMARKS:
  6022.  
  6023.         You will never need to call this method directly.
  6024.  
  6025.         (see TFormatHashTable.Add)
  6026.  
  6027.  
  6028.    ************************************************************************
  6029.    TFormatHashTable.Search function
  6030.    ************************************************************************
  6031.    DECLARATION:
  6032.  
  6033.         function Search(SPos : CellPos; var F : FormatType) : Boolean;
  6034.  
  6035.    UNIT:
  6036.  
  6037.         GLCELL.PAS
  6038.  
  6039.    DESCRIPTION:
  6040.  
  6041.         Determines if a cell is part of a formatted area and if true, returns
  6042.         the appropriate format value for the cell.
  6043.  
  6044.  
  6045.                                          78
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.    PARAMETERS' DESCRIPTION:
  6055.  
  6056.         SPos :    The position in the spreadsheet of the cell whose format value
  6057.                   is being determined.
  6058.  
  6059.         F    :    The appropriate format value for the cell.
  6060.  
  6061.    REMARKS:
  6062.  
  6063.         If the cell is not a formatted cell, the Search returns FALSE.
  6064.  
  6065.  
  6066.    ************************************************************************
  6067.    TFormatHashTable.Store procedure
  6068.    ************************************************************************
  6069.    DECLARATION:
  6070.  
  6071.         procedure Store(var S : TStream);
  6072.  
  6073.    UNIT:
  6074.  
  6075.         GLCELL.PAS
  6076.  
  6077.    DESCRIPTION:
  6078.  
  6079.         Writes a format hash table to disk.
  6080.  
  6081.    PARAMETERS' DESCRIPTION:
  6082.  
  6083.         S : the stream to which the format hash table will be written.
  6084.  
  6085.    ************************************************************************
  6086.    TFormulaCell object
  6087.    ************************************************************************
  6088.    DECLARATION:
  6089.  
  6090.         TFormulaCell = object(TCell)
  6091.             Error : Boolean;
  6092.             Value : Extended;
  6093.             Formula : LString;
  6094.           constructor Init(InitLoc : CellPos; InitError : Boolean;
  6095.             InitValue : Extended; InitFormula : String);
  6096.           function CellType : CellTypes; virtual;
  6097.           function LegalValue : Boolean; virtual;
  6098.           function Name : String; virtual;
  6099.           function Format(var FHash : TFormatHashTable;
  6100.             FormulasDisplayed : Boolean) : FormatType; virtual;
  6101.           function Width(var FHash : TFormatHashTable;
  6102.             FormulasDisplayed : Boolean) : Word; virtual;
  6103.           function Overwritten(var CHash : TCellHashTable;
  6104.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  6105.             var LastPos : CellPos; MaxCols : Word;
  6106.             GetColWidth : GetColWidthFunc; FormulasDisplayed : Boolean) :
  6107.             Word; virtual;
  6108.           function ShouldUpdate : Boolean; virtual;
  6109.           function HasError : Boolean; virtual;
  6110.           function CurrValue : Extended; virtual;
  6111.           function OverwriteStart(var FHash : TFormatHashTable;
  6112.  
  6113.                                            79
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.             var WHash : TWidthHashTable; GetColWidth : GetColWidthFunc;
  6123.             EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  6124.           procedure EditString(MaxDecPlaces : Byte; var Input : String);
  6125.             virtual;
  6126.           function DisplayString(FormulasDisplayed : Boolean;
  6127.             MaxDecPlaces : Byte) : String; virtual;
  6128.           function FormattedString(var OHash : TOverwriteHashTable;
  6129.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  6130.             GetColWidth : GetColWidthFunc; CPos : CellPos;
  6131.             FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  6132.             var CurrencyString : CurrencyStr; var ClType: CellTypes):
  6133.             String; virtual;
  6134.           function CopyString : String; virtual;
  6135.           constructor Load(var S : TStream);
  6136.           procedure Store(var S : TStream);
  6137.           function GetFormula : String;
  6138.           destructor Done; virtual;
  6139.         end; {...TFormulaCell }
  6140.  
  6141.    UNIT:
  6142.  
  6143.         GLCELL.PAS
  6144.  
  6145.    DESCRIPTION:
  6146.  
  6147.         A TCell's descendant that stores a formula its result.
  6148.  
  6149.    ************************************************************************
  6150.    TFormulaCell.CellType function
  6151.    ************************************************************************
  6152.    DECLARATION:
  6153.  
  6154.         (see TCell.CellType)
  6155.  
  6156.    UNIT:
  6157.  
  6158.         GLCELL.PAS
  6159.  
  6160.    ************************************************************************
  6161.    TFormulaCell.CopyString function
  6162.    ************************************************************************
  6163.    DECLARATION:
  6164.  
  6165.         (see TCell.CopyString)
  6166.  
  6167.    UNIT:
  6168.  
  6169.         GLCELL.PAS
  6170.  
  6171.    ************************************************************************
  6172.    TFormulaCell.CurrValue function
  6173.    ************************************************************************
  6174.    DECLARATION:
  6175.  
  6176.         (see TCell.CurrValue)
  6177.  
  6178.  
  6179.  
  6180.  
  6181.                                          80
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.    UNIT:
  6191.  
  6192.         GLCELL.PAS
  6193.  
  6194.    ************************************************************************
  6195.    TFormulaCell.DisplayString function
  6196.    ************************************************************************
  6197.    DECLARATION:
  6198.  
  6199.         (see TCell.DisplayString)
  6200.  
  6201.    UNIT:
  6202.  
  6203.         GLCELL.PAS
  6204.  
  6205.    ************************************************************************
  6206.    TFormulaCell.Done DESTRUCTOR
  6207.    ************************************************************************
  6208.    DECLARATION:
  6209.  
  6210.         destructor Done; virtual;
  6211.  
  6212.    UNIT:
  6213.  
  6214.         GLCELL.PAS
  6215.  
  6216.    DESCRIPTION:
  6217.  
  6218.         Performs all the necessary cleanup and disposal of the TFormulaCell
  6219.         object.
  6220.  
  6221.    ************************************************************************
  6222.    TFormulaCell.EditString procedure
  6223.    ************************************************************************
  6224.    DECLARATION:
  6225.  
  6226.         (see TCell.EditString)
  6227.  
  6228.    UNIT:
  6229.  
  6230.         GLCELL.PAS
  6231.  
  6232.    ************************************************************************
  6233.    TFormulaCell.Error field
  6234.    ************************************************************************
  6235.    DECLARATION:
  6236.  
  6237.         Error : Boolean;
  6238.  
  6239.    UNIT:
  6240.  
  6241.         GLCELL.PAS
  6242.  
  6243.    DESCRIPTION:
  6244.  
  6245.         Indicates if there is a numeric error in the value stored by the cell.
  6246.  
  6247.  
  6248.  
  6249.                                          81
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.    ************************************************************************
  6259.    TFormulaCell.Format function
  6260.    ************************************************************************
  6261.    DECLARATION:
  6262.  
  6263.         (see TCell.Format)
  6264.  
  6265.    UNIT:
  6266.  
  6267.         GLCELL.PAS
  6268.  
  6269.    ************************************************************************
  6270.    TFormulaCell.FormattedString function
  6271.    ************************************************************************
  6272.    DECLARATION:
  6273.  
  6274.         (see TCell.FormattedString)
  6275.  
  6276.    UNIT:
  6277.  
  6278.         GLCELL.PAS
  6279.  
  6280.    ************************************************************************
  6281.    TFormulaCell.Formula field
  6282.    ************************************************************************
  6283.    DECLARATION:
  6284.  
  6285.         Formula : LString;
  6286.  
  6287.    UNIT:
  6288.  
  6289.         GLCELL.PAS
  6290.  
  6291.    DESCRIPTION:
  6292.  
  6293.         Used to store the formula string.
  6294.  
  6295.    REMARKS:
  6296.  
  6297.         (see TTextCell.Txt)
  6298.  
  6299.  
  6300.    ************************************************************************
  6301.    TFormulaCell.GetFormula function
  6302.    ************************************************************************
  6303.    DECLARATION:
  6304.  
  6305.         function GetFormula : String;
  6306.  
  6307.    UNIT:
  6308.  
  6309.         GLCELL.PAS
  6310.  
  6311.    DESCRIPTION:
  6312.  
  6313.         Returns the formula string stored by the cell.
  6314.  
  6315.  
  6316.  
  6317.                                          82
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.    ************************************************************************
  6327.    TFormulaCell.HasError function
  6328.    ************************************************************************
  6329.    DECLARATION:
  6330.  
  6331.         (see TCell.HasError)
  6332.  
  6333.    UNIT:
  6334.  
  6335.         GLCELL.PAS
  6336.  
  6337.    ************************************************************************
  6338.    TFormulaCell.Init CONSTRUCTOR
  6339.    ************************************************************************
  6340.    DECLARATION:
  6341.  
  6342.         constructor Init(InitLoc : CellPos; InitError : Boolean;
  6343.           InitValue : Extended; InitFormula : String);
  6344.  
  6345.    UNIT:
  6346.  
  6347.         GLCELL.PAS
  6348.  
  6349.    DESCRIPTION:
  6350.  
  6351.         Creates and initializes the TFormulaCell object.
  6352.  
  6353.    PARAMETERS' DESCRIPTION:
  6354.  
  6355.         InitLoc   :    the position of the cell in the spreadsheet.
  6356.  
  6357.         InitError :    indicates if there is a numerical error in the cell's
  6358.                        value (the formula's result).
  6359.  
  6360.         InitValue :    the value of the cell (the formula's result).
  6361.  
  6362.         InitFormula :  the formula that the cell will store.
  6363.  
  6364.    ************************************************************************
  6365.    TFormulaCell.LegalValue function
  6366.    ************************************************************************
  6367.    DECLARATION:
  6368.  
  6369.         (see TCell.LegalValue)
  6370.  
  6371.    UNIT:
  6372.  
  6373.         GLCELL.PAS
  6374.  
  6375.    ************************************************************************
  6376.    TFormulaCell.Load CONSTRUCTOR
  6377.    ************************************************************************
  6378.    DECLARATION:
  6379.  
  6380.         constructor Load(var S: TStream);
  6381.  
  6382.  
  6383.  
  6384.  
  6385.                                          83
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.    UNIT:
  6395.  
  6396.         GLCELL.PAS
  6397.  
  6398.    DESCRIPTION:
  6399.  
  6400.         Loads the cell's contents from disk.
  6401.  
  6402.    PARAMETERS' DESCRIPTION:
  6403.  
  6404.         S : the stream from which will be read the cell's contents.
  6405.  
  6406.    ************************************************************************
  6407.    TFormulaCell.Name function
  6408.    ************************************************************************
  6409.    DECLARATION:
  6410.  
  6411.         (see TCell.Name)
  6412.  
  6413.    UNIT:
  6414.  
  6415.         GLCELL.PAS
  6416.  
  6417.    ************************************************************************
  6418.    TFormulaCell.OverwriteStart function
  6419.    ************************************************************************
  6420.    DECLARATION:
  6421.  
  6422.         (see TCell.OverwriteStart)
  6423.  
  6424.    UNIT:
  6425.  
  6426.         GLCELL.PAS
  6427.  
  6428.    ************************************************************************
  6429.    TFormulaCell.Overwritten function
  6430.    ************************************************************************
  6431.    DECLARATION:
  6432.  
  6433.         (see TCell.Overwritten)
  6434.  
  6435.    UNIT:
  6436.  
  6437.         GLCELL.PAS
  6438.  
  6439.    ************************************************************************
  6440.    TFormulaCell.ShouldUpdate function
  6441.    ************************************************************************
  6442.    DECLARATION:
  6443.  
  6444.         (see TCell.ShouldUpdate)
  6445.  
  6446.    UNIT:
  6447.  
  6448.         GLCELL.PAS
  6449.  
  6450.  
  6451.  
  6452.  
  6453.                                          84
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.    ************************************************************************
  6463.    TFormulaCell.Store procedure
  6464.    ************************************************************************
  6465.    DECLARATION:
  6466.  
  6467.         procedure Store(var S: TStream);
  6468.  
  6469.    UNIT:
  6470.  
  6471.         GLCELL.PAS
  6472.  
  6473.    DESCRIPTION:
  6474.  
  6475.         Writes the cell's contents to disk.
  6476.  
  6477.    PARAMETERS' DESCRIPTION:
  6478.  
  6479.         S : the stream to which the cell's contents will be written.
  6480.  
  6481.    ************************************************************************
  6482.    TFormulaCell.Value field
  6483.    ************************************************************************
  6484.    DECLARATION:
  6485.  
  6486.         Value : Extended;
  6487.  
  6488.    UNIT:
  6489.  
  6490.         GLCELL.PAS
  6491.  
  6492.    DESCRIPTION:
  6493.  
  6494.         The numeric value of the formula.
  6495.  
  6496.    REMARKS:
  6497.  
  6498.         (see TFormulaCell.Formula)
  6499.  
  6500.  
  6501.    ************************************************************************
  6502.    TFormulaCell.Width function
  6503.    ************************************************************************
  6504.    DECLARATION:
  6505.  
  6506.         (see TCell.Width)
  6507.  
  6508.    UNIT:
  6509.  
  6510.         GLCELL.PAS
  6511.  
  6512.    ************************************************************************
  6513.    THashTable object
  6514.    ************************************************************************
  6515.    DECLARATION:
  6516.  
  6517.         THashTable = OBJECT(HashTable)
  6518.           function Add: Boolean;
  6519.         end; {...THashTable }
  6520.  
  6521.                                            85
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.    UNIT:
  6531.  
  6532.         GLCELL.PAS
  6533.  
  6534.    DESCRIPTION:
  6535.  
  6536.         Extends Borland's HashTable object;  it checks the value of the
  6537.         LowMemory function before adding any data to the hash table.
  6538.  
  6539.    REMARKS:
  6540.  
  6541.         All the hash tables used in OOGrid Library(TM) v1.0 are descendants of
  6542.         THashTable.
  6543.  
  6544.         (see TCHASH.INT)
  6545.  
  6546.  
  6547.    ************************************************************************
  6548.    THashTable.Add function
  6549.    ************************************************************************
  6550.    DECLARATION:
  6551.  
  6552.         function Add: Boolean;
  6553.  
  6554.    UNIT:
  6555.  
  6556.         GLCELL.PAS
  6557.  
  6558.    DESCRIPTION:
  6559.  
  6560.         Adds data to the hash table by calling HashTable.Add.
  6561.  
  6562.    REMARKS:
  6563.  
  6564.         Add checks the value of the LowMemory function before calling
  6565.         HashTable.Add.  If it returns FALSE, no data is added to the hash table
  6566.         and Add returns FALSE; otherwise, the data is added and Add returns
  6567.         TRUE.
  6568.  
  6569.         The HashTable.Add method adds data to the hash table by calling the
  6570.         CreateItem method.  Since HashTable.CreateItem is an abstract method,
  6571.         this method must be overridden in a HashTable's descendant to actually
  6572.         add any data.
  6573.  
  6574.         (see TCHASH.INT)
  6575.  
  6576.  
  6577.    ************************************************************************
  6578.    THeadersHashTable object
  6579.    ************************************************************************
  6580.    DECLARATION:
  6581.  
  6582.         THeadersHashTable = OBJECT(THashTable)
  6583.             CurrCol : Word;
  6584.             CurrName : String[80];
  6585.           constructor Init(InitBuckets : BucketRange);
  6586.           function Add(SCol : Word; NewName: String) : Boolean;
  6587.           procedure CreateItem(var Item : HashItemPtr); virtual;
  6588.  
  6589.                                            86
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.           procedure Delete(Col : Word);
  6599.           function Found(Item : HashItemPtr) : Boolean; virtual;
  6600.           function HashValue : LongInt; virtual;
  6601.           function ItemSize : HashItemSizeRange; virtual;
  6602.           procedure Load(var S : TStream; Total : Longint);
  6603.           function Search(Col : Word; var Name: String) : Boolean;
  6604.           function SearchName(Name: String; var Col: Word) : Boolean;
  6605.           procedure Store(var S : TStream);
  6606.           destructor Done;
  6607.         end; {...THeadersHashTable }
  6608.  
  6609.    UNIT:
  6610.  
  6611.         GLCELL.PAS
  6612.  
  6613.    DESCRIPTION:
  6614.  
  6615.         Stores custom assigned column headers.
  6616.  
  6617.    REMARKS:
  6618.  
  6619.         Stores the column number and the column's header.
  6620.  
  6621.  
  6622.    ************************************************************************
  6623.    THeadersHashTable.Add function
  6624.    ************************************************************************
  6625.    DECLARATION:
  6626.  
  6627.         function Add(SCol : Word; NewName: String) : Boolean;
  6628.  
  6629.    UNIT:
  6630.  
  6631.         GLCELL.PAS
  6632.  
  6633.    DESCRIPTION:
  6634.  
  6635.         Adds a new header to the headers hash table.
  6636.  
  6637.    PARAMETERS' DESCRIPTION:
  6638.  
  6639.         SCol : number of the column whose header is being added.
  6640.  
  6641.         NewName : the new header for the column.
  6642.  
  6643.    ************************************************************************
  6644.    THeadersHashTable.CreateItem procedure
  6645.    ************************************************************************
  6646.    DECLARATION:
  6647.  
  6648.         (see TCellHashTable.CreateItem)
  6649.  
  6650.    UNIT:
  6651.  
  6652.         GLCELL.PAS
  6653.  
  6654.  
  6655.  
  6656.  
  6657.                                          87
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.    ************************************************************************
  6667.    THeadersHashTable.CurrCol field
  6668.    ************************************************************************
  6669.    DECLARATION:
  6670.  
  6671.         CurrCol : Word
  6672.  
  6673.    UNIT:
  6674.  
  6675.         GLCELL.PAS
  6676.  
  6677.    DESCRIPTION:
  6678.  
  6679.         Stores the column for which a header is being added, searched for or
  6680.         deleted from the headers hash table.
  6681.  
  6682.    REMARKS:
  6683.  
  6684.         You will never need to access this field directly.
  6685.  
  6686.  
  6687.    ************************************************************************
  6688.    THeadersHashTable.CurrName field
  6689.    ************************************************************************
  6690.    DECLARATION:
  6691.  
  6692.         CurrName : String[80];
  6693.  
  6694.    UNIT:
  6695.  
  6696.         GLCELL.PAS
  6697.  
  6698.    DESCRIPTION:
  6699.  
  6700.         Stores the header that is being added, searched for -- if found -- or
  6701.         deleted from the headers hash table.
  6702.  
  6703.    REMARKS:
  6704.  
  6705.         You will never need to access this field directly.
  6706.  
  6707.  
  6708.    ************************************************************************
  6709.    THeadersHashTable.Delete procedure
  6710.    ************************************************************************
  6711.    DECLARATION:
  6712.  
  6713.         procedure Delete(Col : Word);
  6714.  
  6715.    UNIT:
  6716.  
  6717.         GLCELL.PAS
  6718.  
  6719.    DESCRIPTION:
  6720.  
  6721.         Deletes a header from the headers hash table.
  6722.  
  6723.  
  6724.  
  6725.                                          88
  6726.  
  6727.  
  6728.  
  6729.  
  6730.  
  6731.  
  6732.  
  6733.  
  6734.    PARAMETERS' DESCRIPTION:
  6735.  
  6736.         Col : number of the column whose header will be deleted.
  6737.  
  6738.    ************************************************************************
  6739.    THeadersHashTable.Done DESTRUCTOR
  6740.    ************************************************************************
  6741.    DECLARATION:
  6742.  
  6743.         destructor Done;
  6744.  
  6745.    UNIT:
  6746.  
  6747.         GLCELL.PAS
  6748.  
  6749.    DESCRIPTION:
  6750.  
  6751.         Performs the necessary cleanup and disposal of the headers hash table.
  6752.  
  6753.    ************************************************************************
  6754.    THeadersHashTable.Found function
  6755.    ************************************************************************
  6756.    DECLARATION:
  6757.  
  6758.         (see TCellHashTable.Found)
  6759.  
  6760.    UNIT:
  6761.  
  6762.         GLCELL.PAS
  6763.  
  6764.    ************************************************************************
  6765.    THeadersHashTable.HashValue function
  6766.    ************************************************************************
  6767.    DECLARATION:
  6768.  
  6769.         (see TCellHashTable.HashValue)
  6770.  
  6771.    UNIT:
  6772.  
  6773.         GLCELL.PAS
  6774.  
  6775.    ************************************************************************
  6776.    THeadersHashTable.Init CONSTRUCTOR
  6777.    ************************************************************************
  6778.    DECLARATION:
  6779.  
  6780.         constructor Init(InitBuckets : BucketRange);
  6781.  
  6782.    UNIT:
  6783.  
  6784.         GLCELL.PAS
  6785.  
  6786.    DESCRIPTION:
  6787.  
  6788.         Creates and initializes the THeadersHashTable object.
  6789.  
  6790.  
  6791.  
  6792.  
  6793.                                          89
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.    PARAMETERS' DESCRIPTION:
  6803.  
  6804.         InitBuckets :  number of buckets (linked lists) the headers hash  table
  6805.                        will have.
  6806.  
  6807.    ************************************************************************
  6808.    THeadersHashTable.ItemSize function
  6809.    ************************************************************************
  6810.    DECLARATION:
  6811.  
  6812.         (see TCellHashTableashValue.ItemSize)
  6813.  
  6814.    UNIT:
  6815.  
  6816.         GLCELL.PAS
  6817.  
  6818.    ************************************************************************
  6819.    THeadersHashTable.Load procedure
  6820.    ************************************************************************
  6821.    DECLARATION:
  6822.  
  6823.         procedure Load(var S : TStream; Total : Longint);
  6824.  
  6825.    UNIT:
  6826.  
  6827.         GLCELL.PAS
  6828.  
  6829.    DESCRIPTION:
  6830.  
  6831.         Loads a headers hash table from disk.
  6832.  
  6833.    PARAMETERS' DESCRIPTION:
  6834.  
  6835.         S     :   stream from which the headers hash table will be loaded.
  6836.  
  6837.         Total :   total number of items that will be loaded from the stream.
  6838.  
  6839.    ************************************************************************
  6840.    THeadersHashTable.Search function
  6841.    ************************************************************************
  6842.    DECLARATION:
  6843.  
  6844.         function Search(Col : Word; var Name: String) : Boolean;
  6845.  
  6846.    UNIT:
  6847.  
  6848.         GLCELL.PAS
  6849.  
  6850.    DESCRIPTION:
  6851.  
  6852.         Searches for a header given the column number.
  6853.  
  6854.    PARAMETERS' DESCRIPTION:
  6855.  
  6856.         Col  :    the number of the column whose header is being searched.
  6857.  
  6858.         Name :    this parameter will be set to the column's header, if found.
  6859.  
  6860.  
  6861.                                          90
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.    REMARKS:
  6871.  
  6872.         Search will return TRUE if the header was found; FALSE otherwise.
  6873.  
  6874.  
  6875.    ************************************************************************
  6876.    THeadersHashTable.SearchName function
  6877.    ************************************************************************
  6878.    DECLARATION:
  6879.  
  6880.         function SearchName(Name: String; var Col: Word) : Boolean;
  6881.  
  6882.    UNIT:
  6883.  
  6884.         GLCELL.PAS
  6885.  
  6886.    DESCRIPTION:
  6887.  
  6888.         Searches for a column number, given the header.
  6889.  
  6890.    PARAMETERS' DESCRIPTION:
  6891.  
  6892.         Name :    the header of the column whose is being searched.
  6893.  
  6894.         Col  :    this parameter will be set to the column number, if found.
  6895.  
  6896.    REMARKS:
  6897.  
  6898.         SearchName will return TRUE if the header was found; FALSE otherwise.
  6899.  
  6900.  
  6901.    ************************************************************************
  6902.    THeadersHashTable.Store procedure
  6903.    ************************************************************************
  6904.    DECLARATION:
  6905.  
  6906.         procedure Store(var S : TStream);
  6907.  
  6908.    UNIT:
  6909.  
  6910.         GLCELL.PAS
  6911.  
  6912.    DESCRIPTION:
  6913.  
  6914.         Writes a headers hash table to disk.
  6915.  
  6916.    PARAMETERS' DESCRIPTION:
  6917.  
  6918.         S : stream to which the headers hash table will be written.
  6919.  
  6920.    ************************************************************************
  6921.    TLimScrollBar object
  6922.    ************************************************************************
  6923.    DECLARATION:
  6924.  
  6925.         TLimScrollBar = object(TScrollBar)
  6926.             OldValue     : Word;
  6927.             DisplayLimit : Word;
  6928.  
  6929.                                            91
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.           constructor Init(var Bounds: TRect; ADisplayLimit: Integer);
  6939.           function Change: Integer;
  6940.           procedure Draw; virtual;
  6941.           procedure HandleEvent(var Event: TEvent); virtual;
  6942.           constructor Load(var S: TStream);
  6943.           procedure Store(var S: TStream);
  6944.         end; {...TLimScrollBar }
  6945.  
  6946.    UNIT:
  6947.  
  6948.         GLVIEWS.PAS
  6949.  
  6950.    DESCRIPTION:
  6951.  
  6952.         A TScrollBar's descendant that allows the definition of a display
  6953.         subrange.
  6954.  
  6955.    REMARKS:
  6956.  
  6957.         This object is particularly useful if the TScroller object that owns the
  6958.         scrollbar has a very broad scrolling range (for example, 32767 columns,
  6959.         like the spreadsheet).  In this case, a normal TScrollBar object would
  6960.         be of no use at all,  since one click in an arrow would move the
  6961.         scroller more than 1000 columns. TLimScrollBar lets you define a smaller
  6962.         scrolling range, making it more useful than a TScrollBar in this
  6963.         situations.
  6964.  
  6965.  
  6966.    ************************************************************************
  6967.    TLimScrollBar.Change function
  6968.    ************************************************************************
  6969.    DECLARATION:
  6970.  
  6971.         function Change: Integer;
  6972.  
  6973.    UNIT:
  6974.  
  6975.         GLVIEWS.PAS
  6976.  
  6977.    DESCRIPTION:
  6978.  
  6979.         Returns the amount the scrollbar value changed when last moved (the
  6980.         difference between its current value and its old value).
  6981.  
  6982.    REMARKS:
  6983.  
  6984.         (see TLimScrollBar.OldValue)
  6985.  
  6986.  
  6987.    ************************************************************************
  6988.    TLimScrollBar.DisplayLimit field
  6989.    ************************************************************************
  6990.    DECLARATION:
  6991.  
  6992.         DisplayLimit : Word;
  6993.  
  6994.  
  6995.  
  6996.  
  6997.                                          92
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.    UNIT:
  7007.  
  7008.         GLVIEWS.PAS
  7009.  
  7010.    DESCRIPTION:
  7011.  
  7012.         This is the relative maximum value that is used to display the
  7013.         scrollbar.
  7014.  
  7015.    REMARKS:
  7016.  
  7017.         No matter what the position of the scrollbar is, this will always be the
  7018.         maximum value when displaying the scrollbar.  For example, if
  7019.         DisplayLimit is 100 and the value of the scrollbar is 32767, the
  7020.         scrollbar would still be displayed as if the scrollbar's maximum value
  7021.         were 100.
  7022.  
  7023.         Since the relative maximum value is DisplayLimit, the scrollbar
  7024.         indicator will not move unless the scrollbar has a value equal to or
  7025.         smaller than DisplayLimit.  Movement outside this range will not be
  7026.         displayed by the scrollbar.
  7027.  
  7028.  
  7029.    ************************************************************************
  7030.    TLimScrollBar.Draw procedure
  7031.    ************************************************************************
  7032.    DECLARATION:
  7033.  
  7034.         procedure Draw; virtual;
  7035.  
  7036.    UNIT:
  7037.  
  7038.         GLVIEWS.PAS
  7039.  
  7040.    DESCRIPTION:
  7041.  
  7042.         Draws the TLimScrollBar object.
  7043.  
  7044.    REMARKS:
  7045.  
  7046.         Before drawing the scrollbar object, TScrollBar's Max field is
  7047.         temporarily set to DisplayLimit;  TScrollBar's Draw method is then
  7048.         called.  After the call to TScrollBar.Draw, TScrollBar.Max is set to its
  7049.         original value.
  7050.  
  7051.  
  7052.    ************************************************************************
  7053.    TLimScrollBar.HandleEvent procedure
  7054.    ************************************************************************
  7055.    DECLARATION:
  7056.  
  7057.         procedure HandleEvent(var Event: TEvent); virtual;
  7058.  
  7059.    UNIT:
  7060.  
  7061.         GLVIEWS.PAS
  7062.  
  7063.  
  7064.  
  7065.                                          93
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.    DESCRIPTION:
  7075.  
  7076.         Implements the object's event handling.
  7077.  
  7078.    PARAMETERS' DESCRIPTION:
  7079.  
  7080.         Event     :    the event that will be evaluated and, if possible,
  7081.                        handled by this method
  7082.  
  7083.    REMARKS:
  7084.  
  7085.         It handles mouse clicks inside the scrollbar, in the case that the
  7086.         scrollbar's value is outside the display limit.
  7087.  
  7088.  
  7089.    ************************************************************************
  7090.    TLimScrollBar.Init CONSTRUCTOR
  7091.    ************************************************************************
  7092.    DECLARATION:
  7093.  
  7094.         constructor Init(var Bounds: TRect; ADisplayLimit: Integer);
  7095.  
  7096.    UNIT:
  7097.  
  7098.         GLVIEWS.PAS
  7099.  
  7100.    DESCRIPTION:
  7101.  
  7102.         Creates and initializes the TLimScrollBar object.
  7103.  
  7104.    PARAMETERS' DESCRIPTION:
  7105.  
  7106.         Bounds    :    the area where the scrollbar will be displayed
  7107.  
  7108.         ADisplayLimit  :    the scrollbar's relative maximum value
  7109.  
  7110.    REMARKS:
  7111.  
  7112.         (see TLimScrollBar, TLimScrollBar.DisplayLimit)
  7113.  
  7114.  
  7115.    ************************************************************************
  7116.    TLimScrollBar.Load CONSTRUCTOR
  7117.    ************************************************************************
  7118.    DECLARATION:
  7119.  
  7120.         constructor Load(var S: TStream);
  7121.  
  7122.    UNIT:
  7123.  
  7124.         GLVIEWS.PAS
  7125.  
  7126.    DESCRIPTION:
  7127.  
  7128.         Loads the scrollbar from disk.
  7129.  
  7130.  
  7131.  
  7132.  
  7133.                                          94
  7134.  
  7135.  
  7136.  
  7137.  
  7138.  
  7139.  
  7140.  
  7141.  
  7142.    PARAMETERS' DESCRIPTION:
  7143.  
  7144.         S    :    the stream from which the scrollbar will be loaded.
  7145.  
  7146.    ************************************************************************
  7147.    TLimScrollBar.OldValue field
  7148.    ************************************************************************
  7149.    DECLARATION:
  7150.  
  7151.         OldValue : Word;
  7152.  
  7153.    UNIT:
  7154.  
  7155.         GLVIEWS.PAS
  7156.  
  7157.    DESCRIPTION:
  7158.  
  7159.         Stores the last position of the scrollbar.
  7160.  
  7161.    REMARKS:
  7162.  
  7163.         (see TLimScrollBar.Change)
  7164.  
  7165.  
  7166.    ************************************************************************
  7167.    TLimScrollBar.Store procedure
  7168.    ************************************************************************
  7169.    DECLARATION:
  7170.  
  7171.         procedure Store(var S: TStream);
  7172.  
  7173.    UNIT:
  7174.  
  7175.         GLVIEWS.PAS
  7176.  
  7177.    DESCRIPTION:
  7178.  
  7179.         Writes the scrollbar to disk.
  7180.  
  7181.    PARAMETERS' DESCRIPTION:
  7182.  
  7183.         S    :    the stream to which the scrollbar will be written.
  7184.  
  7185.    ************************************************************************
  7186.    TMessageLine object
  7187.    ************************************************************************
  7188.    DECLARATION:
  7189.  
  7190.         TMessageLine = object(TView)
  7191.             StatusMessage : String[79];
  7192.           constructor Init (Bounds:TRect; AMessage:String);
  7193.           procedure Draw; virtual;
  7194.         end; {...TMessageLine }
  7195.  
  7196.    UNIT:
  7197.  
  7198.         GLVIEWS.PAS
  7199.  
  7200.  
  7201.                                          95
  7202.  
  7203.  
  7204.  
  7205.  
  7206.  
  7207.  
  7208.  
  7209.  
  7210.    DESCRIPTION:
  7211.  
  7212.         Displays a string.
  7213.  
  7214.    REMARKS:
  7215.  
  7216.         This object is used to display messages in the status line.
  7217.  
  7218.  
  7219.    ************************************************************************
  7220.    TMessageLine.Draw procedure
  7221.    ************************************************************************
  7222.    DECLARATION:
  7223.  
  7224.         procedure Draw; virtual;
  7225.  
  7226.    UNIT:
  7227.  
  7228.         GLVIEWS.PAS
  7229.  
  7230.    DESCRIPTION:
  7231.  
  7232.         Displays the message in the screen.
  7233.  
  7234.    REMARKS:
  7235.  
  7236.         (see TMessageLine.StatusMessage)
  7237.  
  7238.  
  7239.    ************************************************************************
  7240.    TMessageLine.Init CONSTRUCTOR
  7241.    ************************************************************************
  7242.    DECLARATION:
  7243.  
  7244.         constructor Init (Bounds:TRect; AMessage:String);
  7245.  
  7246.    UNIT:
  7247.  
  7248.         GLVIEWS.PAS
  7249.  
  7250.    DESCRIPTION:
  7251.  
  7252.         Creates and initializes the TMessageLine object and displays it in the
  7253.         screen.
  7254.  
  7255.    PARAMETERS' DESCRIPTION:
  7256.  
  7257.         Bounds    :    the area where the TMessageLine object will be displayed
  7258.  
  7259.         AMessage  :    the message that will be displayed
  7260.  
  7261.    ************************************************************************
  7262.    TMessageLine.StatusMessage field
  7263.    ************************************************************************
  7264.    DECLARATION:
  7265.  
  7266.         StatusMessage : String[79];
  7267.  
  7268.  
  7269.                                          96
  7270.  
  7271.  
  7272.  
  7273.  
  7274.  
  7275.  
  7276.  
  7277.  
  7278.    UNIT:
  7279.  
  7280.         GLVIEWS.PAS
  7281.  
  7282.    DESCRIPTION:
  7283.  
  7284.         The message that will be displayed inside the object's bounds.
  7285.  
  7286.    ************************************************************************
  7287.    ToggleClipBoardOff procedure
  7288.    ************************************************************************
  7289.    DECLARATION:
  7290.  
  7291.         procedure ToggleClipBoardOff;
  7292.  
  7293.    UNIT:
  7294.  
  7295.         GLTSHEET.PAS
  7296.  
  7297.    DESCRIPTION:
  7298.  
  7299.         Resets the clipboard.
  7300.  
  7301.    REMARKS:
  7302.  
  7303.         (see Clipboard, ToggleClipBoardOn)
  7304.  
  7305.  
  7306.    ************************************************************************
  7307.    ToggleClipBoardOn procedure
  7308.    ************************************************************************
  7309.    DECLARATION:
  7310.  
  7311.         procedure ToggleClipBoardOn(SpreadSheet: PSpreadSheet; Block:
  7312.           PBlock; ABlockOn: Boolean; Op: BlockOperation);
  7313.  
  7314.    UNIT:
  7315.  
  7316.         GLTSHEET.PAS
  7317.  
  7318.    DESCRIPTION:
  7319.  
  7320.         Sets the Clipboard fields with the information necessary for a copy or
  7321.         move operation.
  7322.  
  7323.    PARAMETERS' DESCRIPTION:
  7324.  
  7325.         SpreadSheet    :    the spreadsheet where the cells to be copied or
  7326.                             moved are stored
  7327.  
  7328.         Block     :    the block of cells to be copied or moved
  7329.  
  7330.         ABlockOn  :    indicates if a block of cells or only a single cell is
  7331.                        being copied or moved
  7332.  
  7333.         Op   :    the operation (copy or move) requested
  7334.  
  7335.  
  7336.  
  7337.                                          97
  7338.  
  7339.  
  7340.  
  7341.  
  7342.  
  7343.  
  7344.  
  7345.  
  7346.    REMARKS:
  7347.  
  7348.         (see Clipboard, ToggleClipBoardOff)
  7349.  
  7350.  
  7351.    ************************************************************************
  7352.    TOverwriteHashTable object
  7353.    ************************************************************************
  7354.    DECLARATION:
  7355.  
  7356.         TOverwriteHashTable = OBJECT(THashTable)
  7357.               CurrCell : PCell;
  7358.               CurrPos : CellPos;
  7359.               EndCol : Word;
  7360.           constructor Init(InitBuckets : BucketRange);
  7361.           destructor Done;
  7362.           function Add(SCell : PCell; var CHash: TCellHashTable;
  7363.             var FHash: TFormatHashTable; var WHash: TWidthHashTable;
  7364.             LastPos: CellPos; MaxCols: Word; GetColWidth: GetColWidthFunc;
  7365.             FormulasDisplayed, ChangeYes: Boolean) : Boolean;
  7366.           procedure Delete(SPos : CellPos; var CHash: TCellHashTable;
  7367.             var FHash: TFormatHashTable; var WHash: TWidthHashTable;
  7368.             LastPos: CellPos; MaxCols: Word;
  7369.             GetColWidth: GetColWidthFunc; FormulasDisplayed,
  7370.             ChangeYes: Boolean);
  7371.           function Change(SCell : PCell; Overwritten : Word) : Boolean;
  7372.           function Search(SPos : CellPos) : PCell;
  7373.           function HashValue : LongInt; virtual;
  7374.           function Found(Item : HashItemPtr) : Boolean; virtual;
  7375.           procedure CreateItem(var Item : HashItemPtr); virtual;
  7376.           function ItemSize : HashItemSizeRange; virtual;
  7377.         end; {...TOverwriteHashTable }
  7378.  
  7379.    UNIT:
  7380.  
  7381.         GLCELL.PAS
  7382.  
  7383.    DESCRIPTION:
  7384.  
  7385.         Keeps track of which empty cells are overwritten (in the screen) by
  7386.         other cells.
  7387.  
  7388.    REMARKS:
  7389.  
  7390.         A cell overwrites an empty cell when the cell's contents do not fit in
  7391.         the cell.
  7392.  
  7393.  
  7394.    ************************************************************************
  7395.    TOverwriteHashTable.Add function
  7396.    ************************************************************************
  7397.    DECLARATION:
  7398.  
  7399.         function Add(SCell : PCell; var CHash: TCellHashTable;
  7400.           var FHash: TFormatHashTable; var WHash: TWidthHashTable;
  7401.           LastPos: CellPos; MaxCols: Word; GetColWidth: GetColWidthFunc;
  7402.           FormulasDisplayed, ChangeYes: Boolean) : Boolean;
  7403.  
  7404.  
  7405.                                          98
  7406.  
  7407.  
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.    UNIT:
  7415.  
  7416.         GLCELL.PAS
  7417.  
  7418.    DESCRIPTION:
  7419.  
  7420.         Adds a cell and the number of empty cells it overwrites to the overwrite
  7421.         hash table.
  7422.  
  7423.    PARAMETERS' DESCRIPTION:
  7424.  
  7425.         SCell       :  The cell being added to the overwrite hash table.
  7426.  
  7427.         CHash       :  A cell hash table.  Used to determine the number of empty
  7428.                        cells the given cell; this number depends on whether or
  7429.                        not there is a non-empty cell near the given cell.
  7430.  
  7431.         FHash       :  A format hash table.  Used to determine the format of the
  7432.                        cell; the size of the contents of a cell depends on its
  7433.                        format.
  7434.  
  7435.         WHash       :  A width hash table.  Used to determine column widths; the
  7436.                        number of cells a given cell overwrites, also depends on
  7437.                        the width of the column it finds in its way.
  7438.  
  7439.         LastPos     :  the lower right corner of the block of used cells in the
  7440.                        spreadsheet.
  7441.  
  7442.         MaxCols     :  the maximum number of columns available in the
  7443.                        spreadsheet.
  7444.  
  7445.         GetColWidth :  a function used to determine the width of a column (see
  7446.                        GetColWidth).
  7447.  
  7448.         FormulasDisplayed : indicates if the spreadsheet is in Display Formulas
  7449.                             mode, which also affects the number of empty-cells a
  7450.                             formula cell may overwrite.
  7451.  
  7452.         ChangeYes         : when a cell is added to the overwrite hash table,
  7453.                             overwrite information for cells at the left may
  7454.                             change; this parameter indicates if overwrite
  7455.                             information for those cells should be modified if
  7456.                             necessary.
  7457.  
  7458.    REMARKS:
  7459.  
  7460.         If the given cell does not overwrite any empty cells, it will not be
  7461.         added to the overwrite hash table.
  7462.  
  7463.  
  7464.    ************************************************************************
  7465.    TOverwriteHashTable.Change function
  7466.    ************************************************************************
  7467.    DECLARATION:
  7468.  
  7469.         function Change(SCell : PCell; Overwritten : Word) : Boolean;
  7470.  
  7471.  
  7472.  
  7473.                                          99
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.    UNIT:
  7483.  
  7484.         GLCELL.PAS
  7485.  
  7486.    DESCRIPTION:
  7487.  
  7488.         Changes the overwrite information of the given cell.
  7489.  
  7490.    PARAMETERS' DESCRIPTION:
  7491.  
  7492.         SCell       :  The cell whose overwrite information is being changed.
  7493.  
  7494.         Overwritten :  the new number of empty cells overwritten by the given
  7495.                        cell.
  7496.  
  7497.    REMARKS:
  7498.  
  7499.         It returns TRUE if the information has been sucessfully changed.
  7500.  
  7501.  
  7502.    ************************************************************************
  7503.    TOverwriteHashTable.CreateItem procedure
  7504.    ************************************************************************
  7505.    DECLARATION:
  7506.  
  7507.         (see TCellHashTable.CreateItem)
  7508.  
  7509.    UNIT:
  7510.  
  7511.         GLCELL.PAS
  7512.  
  7513.    ************************************************************************
  7514.    TOverwriteHashTable.CurrCell field
  7515.    ************************************************************************
  7516.    DECLARATION:
  7517.  
  7518.         CurrCell : PCell;
  7519.  
  7520.    UNIT:
  7521.  
  7522.         GLCELL.PAS
  7523.  
  7524.    DESCRIPTION:
  7525.  
  7526.         Stores the cell pointer that is being added, searched for or deleted
  7527.         from the overwrite hash table.
  7528.  
  7529.    REMARKS:
  7530.  
  7531.         You will never need to access this field directly.
  7532.  
  7533.  
  7534.    ************************************************************************
  7535.    TOverwriteHashTable.CurrPos field
  7536.    ************************************************************************
  7537.    DECLARATION:
  7538.  
  7539.         CurrPos : CellPos;
  7540.  
  7541.                                            100
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.    UNIT:
  7551.  
  7552.         GLCELL.PAS
  7553.  
  7554.    DESCRIPTION:
  7555.  
  7556.         Stores the location of the cell that is being added, searched for or
  7557.         deleted from the overwrite hash table.
  7558.  
  7559.    REMARKS:
  7560.  
  7561.         You will never need to access this field directly.
  7562.  
  7563.  
  7564.    ************************************************************************
  7565.    TOverwriteHashTable.Delete procedure
  7566.    ************************************************************************
  7567.    DECLARATION:
  7568.  
  7569.         procedure Delete(SPos : CellPos; var CHash: TCellHashTable;
  7570.           var FHash: TFormatHashTable; var WHash: TWidthHashTable;
  7571.           LastPos: CellPos; MaxCols: Word; GetColWidth: GetColWidthFunc;
  7572.           FormulasDisplayed, ChangeYes: Boolean);
  7573.  
  7574.    UNIT:
  7575.  
  7576.         GLCELL.PAS
  7577.  
  7578.    DESCRIPTION:
  7579.  
  7580.         Deletes a cell and its overwrite information from the overwrite hash
  7581.         table.
  7582.  
  7583.    PARAMETERS' DESCRIPTION:
  7584.  
  7585.         SPos        :  The position of the cell being deleted from the overwrite
  7586.                        hash table.
  7587.  
  7588.         CHash       :  A cell hash table.  Used to determine the number of empty
  7589.                        cells the given cell; this number depends on whether or
  7590.                        not there is a non-empty cell near the given cell.  Used
  7591.                        when ChangeYes (see below) is TRUE.
  7592.  
  7593.         FHash       :  A format hash table.  Used to determine the format of the
  7594.                        cell; the size of the contents of a cell depends on its
  7595.                        format.  Used when ChangeYes (see below) is TRUE.
  7596.  
  7597.         WHash       :  A width hash table.  Used to determine column widths; the
  7598.                        number of cells a given cell overwrites, also depends on
  7599.                        the width of the column it finds in its way.  Used when
  7600.                        ChangeYes (see below) is TRUE.
  7601.  
  7602.         LastPos     :  the lower right corner of the block of used cells in the
  7603.                        spreadsheet.
  7604.  
  7605.         MaxCols     :  the maximum number of columns available in the
  7606.                        spreadsheet.
  7607.  
  7608.  
  7609.                                            101
  7610.  
  7611.  
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.         GetColWidth :  a function used to determine the width of a column (see
  7619.                        GetColWidth).
  7620.  
  7621.         FormulasDisplayed : indicates if the spreadsheet is in Display Formulas
  7622.                             mode, which also affects the number of empty-cells a
  7623.                             formula cell may overwrite.
  7624.  
  7625.         ChangeYes         : when a cell is deleted from the overwrite hash
  7626.                             table, overwrite information of cells at the left
  7627.                             may change; this parameter indicates the overwrite
  7628.                             information for those cells should be modified if
  7629.                             necessary.
  7630.  
  7631.    REMARKS:
  7632.  
  7633.         Nothing happens if the cell does not exist in the overwrite hash table.
  7634.  
  7635.         (see TOverwriteHashTable.Add)
  7636.  
  7637.  
  7638.    ************************************************************************
  7639.    TOverwriteHashTable.Done DESTRUCTOR
  7640.    ************************************************************************
  7641.    DECLARATION:
  7642.  
  7643.         destructor Done;
  7644.  
  7645.    UNIT:
  7646.  
  7647.         GLCELL.PAS
  7648.  
  7649.    DESCRIPTION:
  7650.  
  7651.         Performs the necessary cleanup and disposal of the overwrite hash table.
  7652.  
  7653.    ************************************************************************
  7654.    TOverwriteHashTable.EndCol field
  7655.    ************************************************************************
  7656.    DECLARATION:
  7657.  
  7658.         EndCol : Word;
  7659.  
  7660.    UNIT:
  7661.  
  7662.         GLCELL.PAS
  7663.  
  7664.    DESCRIPTION:
  7665.  
  7666.         The number of the last column overwritten by the cell being added,
  7667.         searched for or deleted from the overwrite hash table.
  7668.  
  7669.    REMARKS:
  7670.  
  7671.         You will never need to access this field directly.
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.                                         102
  7678.  
  7679.  
  7680.  
  7681.  
  7682.  
  7683.  
  7684.  
  7685.  
  7686.    ************************************************************************
  7687.    TOverwriteHashTable.Found function
  7688.    ************************************************************************
  7689.    DECLARATION:
  7690.  
  7691.         (see TCellHashTable.Found)
  7692.  
  7693.    UNIT:
  7694.  
  7695.         GLCELL.PAS
  7696.  
  7697.    ************************************************************************
  7698.    TOverwriteHashTable.HashValue function
  7699.    ************************************************************************
  7700.    DECLARATION:
  7701.  
  7702.         (see TCellHashTable.HashValue)
  7703.  
  7704.    UNIT:
  7705.  
  7706.         GLCELL.PAS
  7707.  
  7708.    ************************************************************************
  7709.    TOverwriteHashTable.Init CONSTRUCTOR
  7710.    ************************************************************************
  7711.    DECLARATION:
  7712.  
  7713.         constructor Init(InitBuckets : BucketRange);
  7714.  
  7715.    UNIT:
  7716.  
  7717.         GLCELL.PAS
  7718.  
  7719.    DESCRIPTION:
  7720.  
  7721.         Creates and initializes the TOverwriteHashTable object.
  7722.  
  7723.    PARAMETERS' DESCRIPTION:
  7724.  
  7725.         InitBuckets :  the number of buckets (linked lists) the overwrite hash
  7726.                        table will have.
  7727.  
  7728.    ************************************************************************
  7729.    TOverwriteHashTable.ItemSize function
  7730.    ************************************************************************
  7731.    DECLARATION:
  7732.  
  7733.         (see TCellHashTable.ItemSize)
  7734.  
  7735.    UNIT:
  7736.  
  7737.         GLCELL.PAS
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.  
  7745.                                         103
  7746.  
  7747.  
  7748.  
  7749.  
  7750.  
  7751.  
  7752.  
  7753.  
  7754.    ************************************************************************
  7755.    TOverwriteHashTable.Search function
  7756.    ************************************************************************
  7757.    DECLARATION:
  7758.  
  7759.         function Search(SPos : CellPos) : PCell;
  7760.  
  7761.    UNIT:
  7762.  
  7763.         Returns a pointer to the cell that overwrites the empty cell at the
  7764.         given position.
  7765.  
  7766.    DESCRIPTION:
  7767.  
  7768.         GLCELL.PAS
  7769.  
  7770.    PARAMETERS' DESCRIPTION:
  7771.  
  7772.         SPos      :    Search checks if the empty cell at this position is
  7773.                        overwritten by another cell.
  7774.  
  7775.    REMARKS:
  7776.  
  7777.         If the empty cell is not overwritten by another cell, Search returns a
  7778.         pointer to an empty cell.
  7779.  
  7780.  
  7781.    ************************************************************************
  7782.    TRepeatCell object
  7783.    ************************************************************************
  7784.    DECLARATION:
  7785.  
  7786.         TRepeatCell = OBJECT(TCell)
  7787.             RepeatChar : Char;
  7788.           constructor Init(InitLoc : CellPos; InitChar : Char);
  7789.           function CellType : CellTypes; virtual;
  7790.           function LegalValue : Boolean; virtual;
  7791.           function Name : String; virtual;
  7792.           function Format(var FHash : TFormatHashTable;
  7793.             FormulasDisplayed : Boolean) : FormatType; virtual;
  7794.           function Width(var FHash : TFormatHashTable;
  7795.             FormulasDisplayed : Boolean) : Word; virtual;
  7796.           function Overwritten(var CHash : TCellHashTable;
  7797.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  7798.             var LastPos : CellPos; MaxCols : Word;
  7799.             GetColWidth : GetColWidthFunc; FormulasDisplayed : Boolean) :
  7800.             Word; virtual;
  7801.           function ShouldUpdate : Boolean; virtual;
  7802.           function HasError : Boolean; virtual;
  7803.           function CurrValue : Extended; virtual;
  7804.           function OverwriteStart(var FHash : TFormatHashTable;
  7805.             var WHash : TWidthHashTable; GetColWidth : GetColWidthFunc;
  7806.             EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  7807.           procedure EditString(MaxDecPlaces : Byte; var Input : String);
  7808.             virtual;
  7809.           function DisplayString(FormulasDisplayed : Boolean;
  7810.             MaxDecPlaces : Byte) : String; virtual;
  7811.           function FormattedString(var OHash : TOverwriteHashTable;
  7812.  
  7813.                                            104
  7814.  
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  7823.             GetColWidth : GetColWidthFunc; CPos : CellPos;
  7824.             FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  7825.             var CurrencyString : CurrencyStr; var ClType: CellTypes):
  7826.             String; virtual;
  7827.           function CopyString : String; virtual;
  7828.           constructor Load(var S : TStream);
  7829.           procedure Store(var S : TStream);
  7830.         end; {...TRepeatCell }
  7831.  
  7832.    UNIT:
  7833.  
  7834.         GLCELL.PAS
  7835.  
  7836.    DESCRIPTION:
  7837.  
  7838.         Stores a character that will be repeated in all the cell when displayed.
  7839.  
  7840.    REMARKS:
  7841.  
  7842.         A repeat cell will overwrite all empty cells to its left, until it
  7843.         reaches the end of the spreadsheet or finds a non-empty cell in its way.
  7844.  
  7845.  
  7846.    ************************************************************************
  7847.    TRepeatCell.CellType function
  7848.    ************************************************************************
  7849.    DECLARATION:
  7850.  
  7851.         (see TCell.CellType)
  7852.  
  7853.    UNIT:
  7854.  
  7855.         GLCELL.PAS
  7856.  
  7857.    ************************************************************************
  7858.    TRepeatCell.CopyString function
  7859.    ************************************************************************
  7860.    DECLARATION:
  7861.  
  7862.         (see TCell.CopyString)
  7863.  
  7864.    UNIT:
  7865.  
  7866.         GLCELL.PAS
  7867.  
  7868.    ************************************************************************
  7869.    TRepeatCell.CurrValue function
  7870.    ************************************************************************
  7871.    DECLARATION:
  7872.  
  7873.         (see TCell.CurrValue)
  7874.  
  7875.    UNIT:
  7876.  
  7877.         GLCELL.PAS
  7878.  
  7879.  
  7880.  
  7881.                                         105
  7882.  
  7883.  
  7884.  
  7885.  
  7886.  
  7887.  
  7888.  
  7889.  
  7890.    ************************************************************************
  7891.    TRepeatCell.DisplayString function
  7892.    ************************************************************************
  7893.    DECLARATION:
  7894.  
  7895.         (see TCell.DisplayString)
  7896.  
  7897.    UNIT:
  7898.  
  7899.         GLCELL.PAS
  7900.  
  7901.    ************************************************************************
  7902.    TRepeatCell.EditString procedure
  7903.    ************************************************************************
  7904.    DECLARATION:
  7905.  
  7906.         (see TCell.EditString)
  7907.  
  7908.    UNIT:
  7909.  
  7910.         GLCELL.PAS
  7911.  
  7912.    ************************************************************************
  7913.    TRepeatCell.Format function
  7914.    ************************************************************************
  7915.    DECLARATION:
  7916.  
  7917.         (see TCell.Format)
  7918.  
  7919.    UNIT:
  7920.  
  7921.         GLCELL.PAS
  7922.  
  7923.    ************************************************************************
  7924.    TRepeatCell.FormattedString function
  7925.    ************************************************************************
  7926.    DECLARATION:
  7927.  
  7928.         (see TCell.FormattedString)
  7929.  
  7930.    UNIT:
  7931.  
  7932.         GLCELL.PAS
  7933.  
  7934.    ************************************************************************
  7935.    TRepeatCell.HasError function
  7936.    ************************************************************************
  7937.    DECLARATION:
  7938.  
  7939.         (see TCell.HasError)
  7940.  
  7941.    UNIT:
  7942.  
  7943.         GLCELL.PAS
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.                                         106
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.    ************************************************************************
  7959.    TRepeatCell.Init CONSTRUCTOR
  7960.    ************************************************************************
  7961.    DECLARATION:
  7962.  
  7963.         constructor Init(InitLoc : CellPos; InitChar : Char);
  7964.  
  7965.    UNIT:
  7966.  
  7967.         GLCELL.PAS
  7968.  
  7969.    DESCRIPTION:
  7970.  
  7971.         Creates and initializes the TRepeatCell object.
  7972.  
  7973.    PARAMETERS' DESCRIPTION:
  7974.  
  7975.         InitLoc   :    the position of the cell in the spreadsheet.
  7976.  
  7977.         InitChar  :    the character that will be repeated.
  7978.  
  7979.    ************************************************************************
  7980.    TRepeatCell.LegalValue function
  7981.    ************************************************************************
  7982.    DECLARATION:
  7983.  
  7984.         (see TCell.LegalValue)
  7985.  
  7986.    UNIT:
  7987.  
  7988.         GLCELL.PAS
  7989.  
  7990.    ************************************************************************
  7991.    TRepeatCell.Load CONSTRUCTOR
  7992.    ************************************************************************
  7993.    DECLARATION:
  7994.  
  7995.         constructor Load(var S: TStream);
  7996.  
  7997.    UNIT:
  7998.  
  7999.         GLCELL.PAS
  8000.  
  8001.    DESCRIPTION:
  8002.  
  8003.         Loads the cell's contents from disk.
  8004.  
  8005.    PARAMETERS' DESCRIPTION:
  8006.  
  8007.         S : the stream from which will be read the cell's contents.
  8008.  
  8009.    ************************************************************************
  8010.    TRepeatCell.Name function
  8011.    ************************************************************************
  8012.    DECLARATION:
  8013.  
  8014.         (see TCell.Name)
  8015.  
  8016.  
  8017.                                         107
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.  
  8024.  
  8025.  
  8026.    UNIT:
  8027.  
  8028.         GLCELL.PAS
  8029.  
  8030.    ************************************************************************
  8031.    TRepeatCell.OverwriteStart function
  8032.    ************************************************************************
  8033.    DECLARATION:
  8034.  
  8035.         (see TCell.OverwriteStart)
  8036.  
  8037.    UNIT:
  8038.  
  8039.         GLCELL.PAS
  8040.  
  8041.    ************************************************************************
  8042.    TRepeatCell.Overwritten function
  8043.    ************************************************************************
  8044.    DECLARATION:
  8045.  
  8046.         (see TCell.Overwritten)
  8047.  
  8048.    UNIT:
  8049.  
  8050.         GLCELL.PAS
  8051.  
  8052.    ************************************************************************
  8053.    TRepeatCell.RepeatChar field
  8054.    ************************************************************************
  8055.    DECLARATION:
  8056.  
  8057.         RepeatChar : Char;
  8058.  
  8059.    UNIT:
  8060.  
  8061.         GLCELL.PAS
  8062.  
  8063.    DESCRIPTION:
  8064.  
  8065.         Used to store the character that will be repeated in the cell when
  8066.         displayed.
  8067.  
  8068.    ************************************************************************
  8069.    TRepeatCell.ShouldUpdate function
  8070.    ************************************************************************
  8071.    DECLARATION:
  8072.  
  8073.         (see TCell.ShouldUpdate)
  8074.  
  8075.    UNIT:
  8076.  
  8077.         GLCELL.PAS
  8078.  
  8079.  
  8080.  
  8081.  
  8082.  
  8083.  
  8084.  
  8085.                                         108
  8086.  
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.    ************************************************************************
  8095.    TRepeatCell.Store procedure
  8096.    ************************************************************************
  8097.    DECLARATION:
  8098.  
  8099.         procedure Store(var S: TStream);
  8100.  
  8101.    UNIT:
  8102.  
  8103.         GLCELL.PAS
  8104.  
  8105.    DESCRIPTION:
  8106.  
  8107.         Writes the cell's contents to disk.
  8108.  
  8109.    PARAMETERS' DESCRIPTION:
  8110.  
  8111.         S : the stream to which the cell's contents will be written.
  8112.  
  8113.    ************************************************************************
  8114.    TRepeatCell.Width function
  8115.    ************************************************************************
  8116.    DECLARATION:
  8117.  
  8118.         (see TCell.Width)
  8119.  
  8120.    UNIT:
  8121.  
  8122.         GLCELL.PAS
  8123.  
  8124.    ************************************************************************
  8125.    TScreenArea object
  8126.    ************************************************************************
  8127.    DECLARATION:
  8128.  
  8129.         TScreenArea = object(TObject)
  8130.             UpperLeft,
  8131.             LowerRight : ScreenPos;
  8132.             Attrib     : Byte;
  8133.           constructor Init(InitX1 : ScreenColRange; InitY1 :
  8134.             ScreenRowRange;  InitX2 : ScreenColRange; InitY2 :
  8135.             ScreenRowRange; InitAttrib : Word);
  8136.           function PointInArea(X, Y: Byte): Boolean;
  8137.         end; {...TScreenArea }
  8138.  
  8139.    UNIT:
  8140.  
  8141.         GLSUPPRT.PAS
  8142.  
  8143.    DESCRIPTION:
  8144.  
  8145.         Stores the position of an area in the screen and the value of the 
  8146.         attribute that should be used to display the the text in the area.
  8147.  
  8148.  
  8149.  
  8150.  
  8151.  
  8152.  
  8153.                                         109
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.    ************************************************************************
  8163.    TScreenArea.Attrib field
  8164.    ************************************************************************
  8165.    DECLARATION:
  8166.  
  8167.         Attrib : Byte;
  8168.  
  8169.    UNIT:
  8170.  
  8171.         GLSUPPRT.PAS
  8172.  
  8173.    DESCRIPTION:
  8174.  
  8175.         The attribute that should be used to display any text inside the defined
  8176.         area.
  8177.  
  8178.    ************************************************************************
  8179.    TScreenArea.Init CONSTRUCTOR
  8180.    ************************************************************************
  8181.    DECLARATION:
  8182.  
  8183.         constructor Init(InitX1 : ScreenColRange; InitY1 :
  8184.           ScreenRowRange;  InitX2 : ScreenColRange; InitY2 :
  8185.           ScreenRowRange; InitAttrib : Word);
  8186.  
  8187.    UNIT:
  8188.  
  8189.         GLSUPPRT.PAS
  8190.  
  8191.    DESCRIPTION:
  8192.  
  8193.         Creates and initializes the TScreenAreao object.
  8194.  
  8195.    PARAMETERS' DESCRIPTION:
  8196.  
  8197.         InitX1    :    the column of the upper left corner of the area
  8198.  
  8199.         InitY1    :    the row of the upper left corner of the area
  8200.  
  8201.         InitX2    :    the column of the lower right corner of the area
  8202.  
  8203.         InitY2    :    the row of the lower right corner of the area
  8204.  
  8205.         InitAttrib     :    the attribute that should be used to display any
  8206.                             text inside the area
  8207.  
  8208.    ************************************************************************
  8209.    TScreenArea.LowerRight field
  8210.    ************************************************************************
  8211.    DECLARATION:
  8212.  
  8213.         LowerRight : ScreenPos;
  8214.  
  8215.    UNIT:
  8216.  
  8217.         GLSUPPRT.PAS
  8218.  
  8219.  
  8220.  
  8221.                                         110
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.    DESCRIPTION:
  8231.  
  8232.         The location of the area's lower right corner.
  8233.  
  8234.    ************************************************************************
  8235.    TScreenArea.PointInArea function
  8236.    ************************************************************************
  8237.    DECLARATION:
  8238.  
  8239.         function PointInArea(X, Y: Byte): Boolean;
  8240.  
  8241.    UNIT:
  8242.  
  8243.         GLSUPPRT.PAS
  8244.  
  8245.    DESCRIPTION:
  8246.  
  8247.         Determines if the given point is in the area defined by the object.
  8248.  
  8249.    PARAMETERS' DESCRIPTION:
  8250.  
  8251.         X    :    column where the point is located
  8252.  
  8253.         Y    :    row where the point is located
  8254.  
  8255.    ************************************************************************
  8256.    TScreenArea.UpperLeft field
  8257.    ************************************************************************
  8258.    DECLARATION:
  8259.  
  8260.         UpperLeft : ScreenPos;
  8261.  
  8262.    UNIT:
  8263.  
  8264.         GLSUPPRT.PAS
  8265.  
  8266.    DESCRIPTION:
  8267.  
  8268.         The location of the area's upper left corner.
  8269.  
  8270.    ************************************************************************
  8271.    TSheetInputLine object
  8272.    ************************************************************************
  8273.    DECLARATION:
  8274.  
  8275.         TSheetInputLine = OBJECT(TInputLine)
  8276.             EndState : Word;
  8277.           constructor Init(AMaxLen: Integer);
  8278.           procedure EndModal(Command: Word); virtual;
  8279.           function Execute: Word; virtual;
  8280.           function GetPalette: PPalette; virtual;
  8281.           procedure HandleEvent(var Event: TEvent); virtual;
  8282.           procedure SetState(AState: Word; Enable: Boolean); virtual;
  8283.         end; {...TSheetInputLine }
  8284.  
  8285.    UNIT:
  8286.  
  8287.         GLVIEWS.PAS
  8288.  
  8289.                                         111
  8290.  
  8291.  
  8292.  
  8293.  
  8294.  
  8295.  
  8296.  
  8297.  
  8298.    DESCRIPTION:
  8299.  
  8300.         An input line that can be inserted in a TSpreadSheetWindow object in
  8301.         modal state.  It maps to the color palette of the TSpreadSheetWindow
  8302.         object and handles kbEnter, kbEsc, kbUp and kbDown by ending the modal
  8303.         state of the view.
  8304.  
  8305.    ************************************************************************
  8306.    TSheetInputLine.EndModal procedure
  8307.    ************************************************************************
  8308.    DECLARATION:
  8309.  
  8310.         procedure EndModal(Command: Word); virtual;
  8311.  
  8312.    UNIT:
  8313.  
  8314.         GLVIEWS.PAS
  8315.  
  8316.    DESCRIPTION:
  8317.  
  8318.         Ends the modal state of the view, by assigning a value to the EndState
  8319.         field.
  8320.  
  8321.    PARAMETERS' DESCRIPTION:
  8322.  
  8323.         Command   :    the command value that will be assigned to the EndState
  8324.                        field.
  8325.  
  8326.    REMARKS:
  8327.  
  8328.         (see TSheetInputLine.EndState)
  8329.  
  8330.  
  8331.    ************************************************************************
  8332.    TSheetInputLine.EndState field
  8333.    ************************************************************************
  8334.    DECLARATION:
  8335.  
  8336.         EndState : Word;
  8337.  
  8338.    UNIT:
  8339.  
  8340.         GLVIEWS.PAS
  8341.  
  8342.    DESCRIPTION:
  8343.  
  8344.         Stores the value of the command that will be returned by the ExecView
  8345.         function.
  8346.  
  8347.    REMARKS:
  8348.  
  8349.         As soon as this field is assigned a non-cero value, the view's modal
  8350.         state will end.
  8351.  
  8352.         You will never need to access this field directly.
  8353.  
  8354.         (see TSheetInputLine.EndModal)
  8355.  
  8356.  
  8357.                                         112
  8358.  
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.    ************************************************************************
  8367.    TSheetInputLine.Execute function
  8368.    ************************************************************************
  8369.    DECLARATION:
  8370.  
  8371.         function Execute: Word; virtual;
  8372.  
  8373.    UNIT:
  8374.  
  8375.         GLVIEWS.PAS
  8376.  
  8377.    DESCRIPTION:
  8378.  
  8379.         "Execute is called from TGroup.ExecView whenever a view becomes modal.
  8380.         If a view is to allow modal execution, it must override Execute to
  8381.         provide an event loop.
  8382.  
  8383.         The result of Execute becomes the value returned from ExecView."**
  8384.  
  8385.         **Taken from Borland Pascal's on-Line documentation.
  8386.  
  8387.    REMARKS:
  8388.  
  8389.         The view's modal state ends when a value is assigned to the EndState
  8390.         field.
  8391.  
  8392.         (see TSheetInputLine.EndState, TSheetInputLine.EndModal)
  8393.  
  8394.  
  8395.    ************************************************************************
  8396.    TSheetInputLine.GetPalette function
  8397.    ************************************************************************
  8398.    DECLARATION:
  8399.  
  8400.         function GetPalette: PPalette; virtual;
  8401.  
  8402.    UNIT:
  8403.  
  8404.         GLVIEWS.PAS
  8405.  
  8406.    DESCRIPTION:
  8407.  
  8408.         Returns a pointer to the object's new palette.
  8409.  
  8410.    ************************************************************************
  8411.    TSheetInputLine.HandleEvent procedure
  8412.    ************************************************************************
  8413.    DECLARATION:
  8414.  
  8415.         procedure HandleEvent(var Event: TEvent); virtual;
  8416.  
  8417.    UNIT:
  8418.  
  8419.         GLVIEWS.PAS
  8420.  
  8421.    DESCRIPTION:
  8422.  
  8423.         Implements the object's event handling.
  8424.  
  8425.                                            113
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.    PARAMETERS' DESCRIPTION:
  8435.  
  8436.         Event     :    the event that will be evaluated and, if possible,
  8437.                        handled by this method
  8438.  
  8439.    REMARKS:
  8440.  
  8441.         This method handles the kbEnter, kbUp, kbDown envents by ending the
  8442.         modal state of the view with the cmOk command; kbEsc by ending the modal
  8443.         state of the view with the cmCancel command.
  8444.  
  8445.  
  8446.    ************************************************************************
  8447.    TSheetInputLine.Init CONSTRUCTOR
  8448.    ************************************************************************
  8449.    DECLARATION:
  8450.  
  8451.         constructor Init(AMaxLen: Integer);
  8452.  
  8453.    UNIT:
  8454.  
  8455.         GLVIEWS.PAS
  8456.  
  8457.    DESCRIPTION:
  8458.  
  8459.         Creates and initializes the TSheetInputLine object.
  8460.  
  8461.    PARAMETERS' DESCRIPTION:
  8462.  
  8463.         AMaxLen   :    the maximum length of the string that can be entered in
  8464.                        the input line.
  8465.  
  8466.    ************************************************************************
  8467.    TSheetInputLine.SetState procedure
  8468.    ************************************************************************
  8469.    DECLARATION:
  8470.  
  8471.         procedure SetState(AState: Word; Enable: Boolean); virtual;
  8472.  
  8473.    UNIT:
  8474.  
  8475.         GLVIEWS.PAS
  8476.  
  8477.    DESCRIPTION:
  8478.  
  8479.         Redraws the view whenever the state of the view changes.
  8480.  
  8481.    PARAMETERS' DESCRIPTION:
  8482.  
  8483.         AState    :    the state flag that will be changed
  8484.  
  8485.         Enable    :    enable (TRUE) or disable (FALSE) the given state flag.
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.                                         114
  8494.  
  8495.  
  8496.  
  8497.  
  8498.  
  8499.  
  8500.  
  8501.  
  8502.    ************************************************************************
  8503.    TSortObject object
  8504.    ************************************************************************
  8505.    DECLARATION:
  8506.  
  8507.         TSortObject = object(TObject)
  8508.             KeySortOrder : array[1..3] of SortTypes;
  8509.             KeyCols : array[1..3] of Word;
  8510.             LastKey : Byte;
  8511.             SourceHash: PCellHashTable;
  8512.             CurrentKey, PivotFirstKey, PivotSecondKey,
  8513.             PivotThirdKey: KeyValue;
  8514.             SortBlock : TBlock;
  8515.           constructor Init(SourceCellHash: PCellHashTable);
  8516.           function CurrentKeyPosition(var ComparedRec, PivotRec:
  8517.             KeyValue; SortOrder: SortTypes): KeyPosition;
  8518.           function CurrentRowPosition(CurrRow: Word): KeyPosition;
  8519.           procedure FillKeyRec(SearchCell: CellPos; var KeyRecord:
  8520.             KeyValue);
  8521.           procedure QuickSort(FirstRow, LastRow: Word);
  8522.           function SetKeyArray(FirstKey, SecondKey, ThirdKey: Word;
  8523.             FirstOrder, SecondOrder, ThirdOrder: SortTypes) : Boolean;
  8524.           procedure SetPivot(Row: Word);
  8525.           procedure Sort(ASortBlock: TBlock;
  8526.             FirstKey: Word; AFirstKeySortOrder: SortTypes; SecondKey:
  8527.             Word; ASecondKeySortOrder: SortTypes; ThirdKey: Word;
  8528.             AThirdKeySortOrder: SortTypes);
  8529.           procedure SplitSortBlock(FirstRow, LastRow : Word; var
  8530.             LowFirstRow, LowLastRow, HighFirstRow, HighLastRow : Word);
  8531.           procedure SwapRows(Row1, Row2: Word);
  8532.         end; {...TSortObject }
  8533.  
  8534.    UNIT:
  8535.  
  8536.         GLSORT.PAS
  8537.  
  8538.    DESCRIPTION:
  8539.  
  8540.         Used to sort a list or block of cells in a cell hash table.  The list is
  8541.         sorted in ascending or descending order, given up to three sort keys,
  8542.         using the QuickSort algorithm.
  8543.  
  8544.    REMARKS:
  8545.  
  8546.         A sort key is the number of a column that contains the values that will
  8547.         be used to sort the rows in a list.
  8548.  
  8549.         An instance of this object is created in the initialization section. 
  8550.         See StandardSortObject.
  8551.  
  8552.  
  8553.    ************************************************************************
  8554.    TSortObject.CurrentKeyPosition function
  8555.    ************************************************************************
  8556.    DECLARATION:
  8557.  
  8558.         function CurrentKeyPosition(var ComparedRec, PivotRec: KeyValue;
  8559.           SortOrder: SortTypes): KeyPosition;
  8560.  
  8561.                                            115
  8562.  
  8563.  
  8564.  
  8565.  
  8566.  
  8567.  
  8568.  
  8569.  
  8570.    UNIT:
  8571.  
  8572.         GLSORT.PAS
  8573.  
  8574.    DESCRIPTION:
  8575.  
  8576.         Compares a key with the pivot and returns its position relative to the
  8577.         position of the pivot.
  8578.  
  8579.    PARAMETERS' DESCRIPTION:
  8580.  
  8581.         ComparedRec    :    record containing the key value of the row to be
  8582.                             compared; this value can be the value of the a row's
  8583.                             first, second or third key, depending on the key
  8584.                             being used for comparision.
  8585.  
  8586.         PivotRec       :    record containing the key value of the pivot row;
  8587.                             this value can be the value of the pivot row's
  8588.                             first, second or third key, depending on the key
  8589.                             being used for comparision.
  8590.  
  8591.         SortOrder      :    the order in which the list is being ordered; it can
  8592.                             be the sort order of the first, second or third key,
  8593.                             depending on the key being used for comparision.
  8594.  
  8595.    REMARKS:
  8596.  
  8597.         When the comparision is made, the sort order is taken into account to
  8598.         decide the position of a key relative to the pivot.
  8599.  
  8600.         (see TSortObject.CurrentRowPosition)
  8601.  
  8602.  
  8603.    ************************************************************************
  8604.    TSortObject.CurrentRowPosition function
  8605.    ************************************************************************
  8606.    DECLARATION:
  8607.  
  8608.         function CurrentRowPosition(CurrRow: Word): KeyPosition;
  8609.  
  8610.    UNIT:
  8611.  
  8612.         GLSORT.PAS
  8613.  
  8614.    DESCRIPTION:
  8615.  
  8616.         Compares the given row with the pivot row, and returns its position
  8617.         relative to the position of the pivot.
  8618.  
  8619.    PARAMETERS' DESCRIPTION:
  8620.  
  8621.         CurrRow   :    the row being compared with the pivot.
  8622.  
  8623.    REMARKS:
  8624.  
  8625.         The rows are compared by comparing each of the key values in the row,
  8626.         with the key values in the pivot row.  This is done with calls to
  8627.         CurrentKeyPosition using first key values, second key values -- if
  8628.  
  8629.                                            116
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.         necessary -- and third key values -- if necessary --.
  8639.  
  8640.  
  8641.    ************************************************************************
  8642.    TSortObject.CurrKey field
  8643.    ************************************************************************
  8644.    DECLARATION:
  8645.  
  8646.         CurrKey : KeyValue;
  8647.  
  8648.    UNIT:
  8649.  
  8650.         GLSORT.PAS
  8651.  
  8652.    DESCRIPTION:
  8653.  
  8654.         Stores the value of the key being compared with the pivot key.
  8655.  
  8656.    REMARKS:
  8657.  
  8658.         This value can be either a first key, second key or third key value.
  8659.  
  8660.         (see TSortObject.PivotFirstKey, TSortObject.PivotSecondKey,
  8661.         TSortObject.PivotThirdKey)
  8662.  
  8663.  
  8664.    ************************************************************************
  8665.    TSortObject.FillKeyRec procedure
  8666.    ************************************************************************
  8667.    DECLARATION:
  8668.  
  8669.         procedure FillKeyRec(SearchCell: CellPos; var KeyRecord:
  8670.           RKeyValue);
  8671.  
  8672.    UNIT:
  8673.  
  8674.         GLSORT.PAS
  8675.  
  8676.    DESCRIPTION:
  8677.  
  8678.         Fills a KeyValue record with the necessary information about a cell.
  8679.  
  8680.    PARAMETERS' DESCRIPTION:
  8681.  
  8682.         SearchCell     :    the cell being compared;  the information about this
  8683.                             cell will be put in the KeyRecord parameter.
  8684.  
  8685.         KeyRecord      :    will contain the cell's information.
  8686.  
  8687.    ************************************************************************
  8688.    TSortObject.Init CONSTRUCTOR
  8689.    ************************************************************************
  8690.    DECLARATION:
  8691.  
  8692.         constructor Init(SourceCellHash: PCellHashTable);
  8693.  
  8694.  
  8695.  
  8696.  
  8697.                                         117
  8698.  
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.    UNIT:
  8707.  
  8708.         GLSORT.PAS
  8709.  
  8710.    DESCRIPTION:
  8711.  
  8712.         Creates and initializes the TSortObject object.
  8713.  
  8714.    PARAMETERS' DESCRIPTION:
  8715.  
  8716.         SourceCellHash :    the cell hash table that contains the block of cells
  8717.                             to be sorted.
  8718.  
  8719.    ************************************************************************
  8720.    TSortObject.KeyCols field
  8721.    ************************************************************************
  8722.    DECLARATION:
  8723.  
  8724.         KeyCols : array[1..3] of Word;
  8725.  
  8726.    UNIT:
  8727.  
  8728.         GLSORT.PAS
  8729.  
  8730.    DESCRIPTION:
  8731.  
  8732.         Stores the column number of each of the sort keys.
  8733.  
  8734.    ************************************************************************
  8735.    TSortObject.KeySortOrder field
  8736.    ************************************************************************
  8737.    DECLARATION:
  8738.  
  8739.         KeySortOrder : array[1..3] of SortTypes;
  8740.  
  8741.    UNIT:
  8742.  
  8743.         GLSORT.PAS
  8744.  
  8745.    DESCRIPTION:
  8746.  
  8747.         Stores the order (ascending or descending) that will be used to sort the
  8748.         list.
  8749.  
  8750.    REMARKS:
  8751.  
  8752.         Each of the sort keys can be sorted in ascending or descending order
  8753.         independently.
  8754.  
  8755.         (see SortTypes)
  8756.  
  8757.  
  8758.    ************************************************************************
  8759.    TSortObject.LastKey field
  8760.    ************************************************************************
  8761.    DECLARATION:
  8762.  
  8763.         LastKey : Byte;
  8764.  
  8765.                                            118
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.    UNIT:
  8775.  
  8776.         GLSORT.PAS
  8777.  
  8778.    DESCRIPTION:
  8779.  
  8780.         The last valid sort key (can be either 1, 2 or 3).
  8781.  
  8782.    REMARKS:
  8783.  
  8784.         Used to indicate to the sort algorithm the number of keys it should use
  8785.         to sort the list.
  8786.  
  8787.  
  8788.    ************************************************************************
  8789.    TSortObject.PivotFirstKey field
  8790.    ************************************************************************
  8791.    DECLARATION:
  8792.  
  8793.         PivotFirstKey : KeyValue;
  8794.  
  8795.    UNIT:
  8796.  
  8797.         GLSORT.PAS
  8798.  
  8799.    DESCRIPTION:
  8800.  
  8801.         Stores the value of the first key of the pivot row.  The first key of
  8802.         all the other rows will be compared with this value to determine their
  8803.         position relative to the position of the pivot row.
  8804.  
  8805.    ************************************************************************
  8806.    TSortObject.PivotSecondKey field
  8807.    ************************************************************************
  8808.    DECLARATION:
  8809.  
  8810.         PivotSecondKey : KeyValue;
  8811.  
  8812.    UNIT:
  8813.  
  8814.         GLSORT.PAS
  8815.  
  8816.    DESCRIPTION:
  8817.  
  8818.         Stores the value of the second key of the pivot row.  When the first key
  8819.         of a row is equal to the first key of the pivot row, the row's second
  8820.         key will be compared with this value to determine its position relative
  8821.         to the position of the pivot row.
  8822.  
  8823.    ************************************************************************
  8824.    TSortObject.PivotThirdKey field
  8825.    ************************************************************************
  8826.    DECLARATION:
  8827.  
  8828.         PivotThirdKey : KeyValue;
  8829.  
  8830.  
  8831.  
  8832.  
  8833.                                         119
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.    UNIT:
  8843.  
  8844.         GLSORT.PAS
  8845.  
  8846.    DESCRIPTION:
  8847.  
  8848.         Stores the value of the third key of the pivot row.  When the second key
  8849.         of a row is equal to the second key of the pivot row, the row's third
  8850.         key will be compared with this value to determine its position relative
  8851.         to the position pivot row.
  8852.  
  8853.    ************************************************************************
  8854.    TSortObject.QuickSort procedure
  8855.    ************************************************************************
  8856.    DECLARATION:
  8857.  
  8858.         procedure QuickSort(FirstRow, LastRow: Word);
  8859.  
  8860.    UNIT:
  8861.  
  8862.         GLSORT.PAS
  8863.  
  8864.    DESCRIPTION:
  8865.  
  8866.         Sorts the cells between the firstrow and lastrow of a block of cells,
  8867.         using the quicksort algorithm.
  8868.  
  8869.    PARAMETERS' DESCRIPTION:
  8870.  
  8871.         FirstRow  :    the upper row of the block of cells to be sorted.
  8872.  
  8873.         LastRow   :    the bottom row of the block of cells to be sorted.
  8874.  
  8875.    REMARKS:
  8876.  
  8877.         The block that will be sorted by this procedure, is a sub-block of the
  8878.         original block of cells.  It will keep the same number of columns, but
  8879.         its number of rows will vary.
  8880.  
  8881.         (see TSortObject.Sort, TSortObject.SplitSortBlock)
  8882.  
  8883.  
  8884.    ************************************************************************
  8885.    TSortObject.SetKeyArray function
  8886.    ************************************************************************
  8887.    DECLARATION:
  8888.  
  8889.         function SetKeyArray(FirstKey, SecondKey, ThirdKey: Word;
  8890.           FirstOrder, SecondOrder, ThirdOrder: SortTypes) : Boolean;
  8891.  
  8892.    UNIT:
  8893.  
  8894.         GLSORT.PAS
  8895.  
  8896.    DESCRIPTION:
  8897.  
  8898.         Puts each key column's number and sort order in the KeyCols and
  8899.         KeySortOrder arrays respectively, and determines the number of valid
  8900.  
  8901.                                            120
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.  
  8908.  
  8909.  
  8910.         sort keys (see TSortObject.LastKey)
  8911.  
  8912.    PARAMETERS' DESCRIPTION:
  8913.  
  8914.         FirstKey  :    the first key's column number.
  8915.  
  8916.         SecondKey :    the second key's column number.
  8917.  
  8918.         ThirdKey  :    the third key's column number.
  8919.  
  8920.         FirstOrder     :    the first key's sort order.
  8921.  
  8922.         SecondOrder    :    the second key's sort order.
  8923.  
  8924.         ThirdOrder     :    the third key's sort order.
  8925.  
  8926.    ************************************************************************
  8927.    TSortObject.SetPivot procedure
  8928.    ************************************************************************
  8929.    DECLARATION:
  8930.  
  8931.         procedure SetPivot(Row: Word);
  8932.  
  8933.    UNIT:
  8934.  
  8935.         GLSORT.PAS
  8936.  
  8937.    DESCRIPTION:
  8938.  
  8939.         Fills each of the pivot keyvalue records.
  8940.  
  8941.    PARAMETERS' DESCRIPTION:
  8942.  
  8943.         Row  :    the number of the row that will be used as a pivot.
  8944.  
  8945.    ************************************************************************
  8946.    TSortObject.Sort procedure
  8947.    ************************************************************************
  8948.    DECLARATION:
  8949.  
  8950.         procedure Sort(ASortBlock: TBlock; FirstKey: Word;
  8951.           AFirstKeySortOrder: SortTypes; SecondKey: Word;
  8952.           ASecondKeySortOrder: SortTypes; ThirdKey: Word;
  8953.           AThirdKeySortOrder: SortTypes);
  8954.  
  8955.    UNIT:
  8956.  
  8957.         GLSORT.PAS
  8958.  
  8959.    DESCRIPTION:
  8960.  
  8961.         Sorts a list or block of cells in a cell hash table, using the QuickSort
  8962.         algorithm.
  8963.  
  8964.    PARAMETERS' DESCRIPTION:
  8965.  
  8966.         ASortBlock     :    the block of cells that will be sorted.
  8967.  
  8968.  
  8969.                                            121
  8970.  
  8971.  
  8972.  
  8973.  
  8974.  
  8975.  
  8976.  
  8977.  
  8978.         FirstKey  :    the first key's column number.
  8979.  
  8980.         AFirstKeySortOrder  :    the first key's sort order.
  8981.  
  8982.         SecondKey :    the Second key's column number.
  8983.  
  8984.         ASecondKeySortOrder :    the Second key's sort order.
  8985.  
  8986.         ThirdKey  :    the Third key's column number.
  8987.  
  8988.         AThirdKeySortOrder  :    the Third key's sort order.
  8989.  
  8990.    ************************************************************************
  8991.    TSortObject.SortBlock field
  8992.    ************************************************************************
  8993.    DECLARATION:
  8994.  
  8995.         SortBlock : TBlock;
  8996.  
  8997.    UNIT:
  8998.  
  8999.         GLSORT.PAS
  9000.  
  9001.    DESCRIPTION:
  9002.  
  9003.         The block of cells that will be sorted.
  9004.  
  9005.    ************************************************************************
  9006.    TSortObject.SourceCellHash field
  9007.    ************************************************************************
  9008.    DECLARATION:
  9009.  
  9010.         SourceHash: PCellHashTable;
  9011.  
  9012.    UNIT:
  9013.  
  9014.         GLSORT.PAS
  9015.  
  9016.    DESCRIPTION:
  9017.  
  9018.         The cell hash table that contains the list or block of cells to be
  9019.         sorted.
  9020.  
  9021.    ************************************************************************
  9022.    TSortObject.SplitSortBlock procedure
  9023.    ************************************************************************
  9024.    DECLARATION:
  9025.  
  9026.         procedure SplitSortBlock(FirstRow, LastRow : Word;
  9027.           var LowFirstRow, LowLastRow, HighFirstRow, HighLastRow : Word);
  9028.  
  9029.    UNIT:
  9030.  
  9031.         GLSORT.PAS
  9032.  
  9033.    DESCRIPTION:
  9034.  
  9035.         Splits the block into two sub-blocks: the first with rows that have key
  9036.  
  9037.                                            122
  9038.  
  9039.  
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.         values smaller than the pivot's value and the second, with rows that
  9047.         have key values bigger than the pivot's value;  the block is not really
  9048.         divided;  this fuction just returns the values of the first and last
  9049.         rows of each virtual sub-block.
  9050.  
  9051.    PARAMETERS' DESCRIPTION:
  9052.  
  9053.         FirstRow  :    the first row of the block of cells that will be divided.
  9054.  
  9055.         LastRow   :    the last row of the block of cells that will be divided.
  9056.  
  9057.         LowFirstRow    :    the first row of the first sub-block.
  9058.  
  9059.         LowLastRow     :    the last row of the first sub-block.
  9060.  
  9061.         HighFirstRow   :    the first row of the second sub-block.
  9062.  
  9063.         HighLastRow    :    the last row of the second sub-block.
  9064.  
  9065.    REMARKS:
  9066.  
  9067.         (see TSortObject.QuickSort)
  9068.  
  9069.  
  9070.    ************************************************************************
  9071.    TSortObject.SwapRows procedure
  9072.    ************************************************************************
  9073.    DECLARATION:
  9074.  
  9075.         procedure SwapRows(Row1, Row2 : Word);
  9076.  
  9077.    UNIT:
  9078.  
  9079.         GLSORT.PAS
  9080.  
  9081.    DESCRIPTION:
  9082.  
  9083.         Swaps the position of two rows in the spreadsheet.
  9084.  
  9085.    PARAMETERS' DESCRIPTION:
  9086.  
  9087.         Row1 :    the number of one of the rows to be swapped.
  9088.  
  9089.         Row2 :    the number of the other row to be swapped.
  9090.  
  9091.    ************************************************************************
  9092.    TSpreadSheet object
  9093.    ************************************************************************
  9094.    DECLARATION:
  9095.  
  9096.         TSpreadSheet = object(TScroller)
  9097.             Number               : Byte;
  9098.             Modified             : Boolean;
  9099.             MaxDecimalPlaces     : Byte;
  9100.             DefaultColWidth      : Byte;
  9101.             DefaultDecimalPlaces : Byte;
  9102.             DefaultCurrency      : CurrencyStr;
  9103.             MaxRows              : Integer;
  9104.  
  9105.                                            123
  9106.  
  9107.  
  9108.  
  9109.  
  9110.  
  9111.  
  9112.  
  9113.  
  9114.             MaxCols              : Integer;
  9115.             MaxColWidth          : Byte;
  9116.             MaxScreenCols        : Byte;
  9117.             TotalRows            : ScreenRowRange;
  9118.             RowNumberSpace       : Byte;
  9119.             OldCurrPos           : CellPos;
  9120.             CurrPos              : CellPos;
  9121.             LastPos              : CellPos;
  9122.             ScreenBlock          : PBlock;
  9123.             CurrBlock            : PBlock;
  9124.             BlockOn              : Boolean;
  9125.             ColArea              : TScreenArea;
  9126.             RowArea              : TScreenArea;
  9127.             InfoArea             : TScreenArea;
  9128.             DataArea             : TScreenArea;
  9129.             DisplayArea          : TScreenArea;
  9130.             ContentsArea         : TScreenArea;
  9131.             BlankArea            : TScreenArea;
  9132.             NoBlankArea          : Boolean;
  9133.             ColStart             : PColStart;
  9134.             CellHash             : TCellHashTable;
  9135.             WidthHash            : TWidthHashTable;
  9136.             OverwriteHash        : TOverwriteHashTable;
  9137.             FormatHash           : TFormatHashTable;
  9138.             DisplayFormulas      : Boolean;
  9139.             AutoCalc             : Boolean;
  9140.             GoToEnd              : Boolean;
  9141.             KeyPressed           : Boolean;
  9142.             EmptyRowsAtTop       : Byte;
  9143.             EmptyRowsAtBottom    : Byte;
  9144.             SheetProtected       : Boolean;
  9145.             DisplayHeaders         : Boolean;
  9146.             UnlockedHash         : TUnlockedHashTable;
  9147.             ColHeadersHash       : THeadersHashTable;
  9148.           constructor Init(var Bounds: TRect; InitCells: LongInt;
  9149.             AEmptyRowsAtTop, AEmptyRowsAtBottom: Byte; AHScrollBar,
  9150.             AVScrollBar: PLimScrollBar; AInitMaxCols, AInitMaxRows:
  9151.             Integer; InitDefaultColWidth, InitDefaultDecimalPlaces,
  9152.             InitMaxDecimalPlaces: Byte; InitDefaultCurrency:
  9153.             CurrencyStr);
  9154.           function  AddCell(CellType: CellTypes; Pos: CellPos; Error:
  9155.             Boolean; Value: Extended; Input: String): Boolean; virtual;
  9156.           function  CellHashStart(TotalCells: LongInt): BucketRange;
  9157.             virtual;
  9158.           function  CellsProtected(Block: TBlock): Boolean; virtual;
  9159.           function  CellToFString(P: CellPos; var AColor: Byte): String;
  9160.             virtual;
  9161.           procedure ChangeBounds(var Bounds: TRect); virtual;
  9162.           procedure ChangeColHeaders; virtual;
  9163.           procedure ChangeColWidth; virtual;
  9164.           procedure CheckForDragging; virtual;
  9165.           procedure ClearCurrBlock; virtual;
  9166.           procedure ClearScreenArea(AreaToClear: PScreenArea); virtual;
  9167.           function  ColHeadersHashStart : BucketRange; virtual;
  9168.           function  ColumnToString(Column: Word): String; virtual;
  9169.           function  ColToX(Col: Integer): Byte; virtual;
  9170.           function  ColWidth(Col: Integer): Byte; virtual;
  9171.           procedure CopyCellBlock; virtual;
  9172.  
  9173.                                            124
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.           procedure DeleteBlock(Block: TBlock; var Deleted: Boolean);
  9183.             virtual;
  9184.           procedure DeleteCell(Pos: CellPos; var Deleted: Boolean);
  9185.             virtual;
  9186.           procedure DeleteColFromHash(Block: TBlock; Columns, EndDelCol:
  9187.             Word; var Deleted: Boolean); virtual;
  9188.           procedure DeleteColHeaders(Block: PBlock); virtual;
  9189.           procedure DeleteColumns; virtual;
  9190.           procedure DeleteRowFromHash(Block: TBlock; Rows, EndDelRow:
  9191.             Word; var Deleted: Boolean); virtual;
  9192.           procedure DeleteRows; virtual;
  9193.           procedure DisplayAllCells; virtual;
  9194.           procedure DisplayBlankArea; virtual;
  9195.           procedure DisplayBlock(B: TBlock); virtual;
  9196.           procedure DisplayBlockDiff(B1, B2: TBlock); virtual;
  9197.           procedure DisplayCell(P: CellPos); virtual;
  9198.           procedure DisplayCellBlock(C1, R1, C2, R2: Word); virtual;
  9199.           procedure DisplayCellData; virtual;
  9200.           procedure DisplayCols; virtual;
  9201.           procedure DisplayInfo; virtual;
  9202.           procedure DisplayRows; virtual;
  9203.           procedure DoAfterEndInput; virtual;
  9204.           procedure DragCursorWithMouse(Event: TEvent); virtual;
  9205.           procedure Draw; virtual;
  9206.           procedure EraseCellBlock(EraseBlock: Boolean); virtual;
  9207.           procedure ExtendCurrBlock(Redraw : Boolean); virtual;
  9208.           procedure FindLastPos(DPos: CellPos); virtual;
  9209.           procedure FindScreenColStart; virtual;
  9210.           procedure FindScreenColStop; virtual;
  9211.           procedure FindScreenRowStart; virtual;
  9212.           procedure FindScreenRowStop; virtual;
  9213.           procedure FixBlockOverWrite(Block: TBlock); virtual;
  9214.           function  FixOverWrite: Boolean; virtual;
  9215.           procedure FormatDefault; virtual;
  9216.           function  FStringSituationColor(P: CellPos; var CP: PCell; var
  9217.             HasError, ColorFound: Boolean): Byte; virtual;
  9218.           procedure GetFormat; virtual;
  9219.           function  GetPalette: PPalette; virtual;
  9220.           procedure GoToCell; virtual;
  9221.           procedure HandleEvent(var Event: TEvent); virtual;
  9222.           procedure HandleInput(FirstChar: String; Editing: Boolean);
  9223.             virtual;
  9224.           procedure InitCurrPos; virtual;
  9225.           procedure InsertColToHash(Block: TBlock; Columns, StartInsCol:
  9226.             Word; var Deleted: Boolean); virtual;
  9227.           procedure InsertColumns; virtual;
  9228.           procedure InsertRowToHash(Block: TBlock; Rows, StartInsRow:
  9229.             Word; var Deleted: Boolean); virtual;
  9230.           procedure InsertRows; virtual;
  9231.           constructor Load(var S: TStream);
  9232.           procedure LoadDelimited(FileName: PathStr); virtual;
  9233.           procedure LoadHashTables(var S: TStream; AdjustAfter: CellPos;
  9234.             RowAdjustment, ColAdjustment: Integer); virtual;
  9235.           procedure LoadTablesFromTempFile(AdjustAfter: CellPos; 
  9236.             RowAdjustment, ColAdjustment: Integer); virtual;
  9237.           procedure LocateCursorWithMouse(Event: TEvent); virtual;
  9238.           procedure MoveCell(OldPos: CellPos); virtual;
  9239.           procedure MoveCellBlock; virtual;
  9240.  
  9241.                                            125
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.           procedure MoveDown; virtual;
  9251.           procedure MoveHome; virtual;
  9252.           procedure MoveLeft; virtual;
  9253.           procedure MovePgDown; virtual;
  9254.           procedure MovePgLeft; virtual;
  9255.           procedure MovePgRight; virtual;
  9256.           procedure MovePgUp; virtual;
  9257.           procedure MoveRight; virtual;
  9258.           procedure MoveUp; virtual;
  9259.           function  OverwriteHashStart: BucketRange; virtual;
  9260.           function  Parser: PParserObject; virtual;
  9261.           procedure PasteBlock(DestBlock: TBlock; Formulas: Word);
  9262.             virtual;
  9263.           procedure PasteCellBlock; virtual;
  9264.           procedure Print; virtual;
  9265.           procedure Recalc(Display: Boolean); virtual;
  9266.           function  RowToY(Row: Integer): Byte; virtual;
  9267.           function  SameCellPos(P1, P2 : CellPos) : Boolean; virtual;
  9268.           procedure ScrollDraw; virtual;
  9269.           function  SelectColumn(var Event: TEvent): Boolean; virtual;
  9270.           procedure SetAreas(ScrollArea: TRect); virtual;
  9271.           procedure SetBlankArea; virtual;
  9272.           procedure SetChanged(IsChanged: Boolean); virtual;
  9273.           procedure SetLimit(X, Y: Integer); virtual;
  9274.           procedure SetLocked; virtual;
  9275.           procedure SetNameWithMouse(var Event: TEvent); virtual;
  9276.           procedure SetNumber(ANumber: Byte); virtual;
  9277.           procedure SetProtection(Enable, Display: Boolean); virtual;
  9278.           procedure SetScreenColStart(NewCol: Integer); virtual;
  9279.           procedure SetScreenColStop(NewCol: Integer); virtual;
  9280.           procedure SetScreenRowStart(NewRow: Integer); virtual;
  9281.           procedure SetScreenRowStop(NewRow: Integer); virtual;
  9282.           procedure SetState(AState: Word; Enable: Boolean); virtual;
  9283.           procedure SetUnlocked; virtual;
  9284.           procedure SortData; virtual;
  9285.           function  SortObject : PSortObject; virtual;
  9286.           procedure Store(var S: TStream);
  9287.           procedure StoreHashTables(var S: TStream); virtual;
  9288.           procedure StoreTablesToTempFile; virtual;
  9289.           procedure ToggleAutoCalc; virtual;
  9290.           procedure ToggleBlockOn; virtual;
  9291.           procedure ToggleDisplayHeaders; virtual;
  9292.           procedure ToggleEnd; virtual;
  9293.           procedure ToggleFormulaDisplay; virtual;
  9294.           function  TrackCursor: Boolean; virtual;
  9295.           procedure UpdateScreenBlockDisplay; virtual;
  9296.           function  WidthHashStart:BucketRange; virtual;
  9297.           function  XToCol(X: Byte): Integer; virtual;
  9298.           function  YToRow(Y: Byte): Integer; virtual;
  9299.           procedure DoneHashTables; virtual;
  9300.           destructor Done; virtual;
  9301.         end; {...TSpreadSheet }
  9302.  
  9303.    UNIT:
  9304.  
  9305.         GLTSHEET.PAS
  9306.  
  9307.  
  9308.  
  9309.                                         126
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.    DESCRIPTION:
  9319.  
  9320.         This object implements a simple spreadsheet that you can use in your
  9321.         applications.  It is the main object in OOGrid Library(TM) v1.0.
  9322.  
  9323.    ************************************************************************
  9324.    TSpreadSheet.AddCell function
  9325.    ************************************************************************
  9326.    DECLARATION:
  9327.  
  9328.         function  AddCell(CellType: CellTypes; Pos: CellPos; Error:
  9329.           Boolean; Value: Extended; Input: String): Boolean; virtual;
  9330.  
  9331.    UNIT:
  9332.  
  9333.         GLTSHEET.PAS
  9334.  
  9335.    DESCRIPTION:
  9336.  
  9337.         Adds a cell to the cell hash table.
  9338.  
  9339.    PARAMETERS' DESCRIPTION:
  9340.  
  9341.         CellType  :    the type of the cell being added
  9342.  
  9343.         Pos  :    the position of the cell in the spreadsheet
  9344.  
  9345.         Error     :    indicates if the contents of the cell have a numeric
  9346.                        error
  9347.  
  9348.         Value     :    the numeric value of the cell
  9349.  
  9350.         Input     :    the string contents of the cell
  9351.  
  9352.    REMARKS:
  9353.  
  9354.         If the cell was succesfully added to the cell hash table, then Add
  9355.         returns TRUE; FALSE otherwise.
  9356.  
  9357.  
  9358.    ************************************************************************
  9359.    TSpreadSheet.AutoCalc field
  9360.    ************************************************************************
  9361.    DECLARATION:
  9362.  
  9363.         AutoCalc : Boolean;
  9364.  
  9365.    UNIT:
  9366.  
  9367.         GLTSHEET.PAS
  9368.  
  9369.    DESCRIPTION:
  9370.  
  9371.         Indicates if the values of the cells in the spreadsheet should be
  9372.         recalculated whenever a cell is modified (i.e. Indicates if the
  9373.         spreadsheet is in AutoCalc mode).
  9374.  
  9375.  
  9376.  
  9377.                                         127
  9378.  
  9379.  
  9380.  
  9381.  
  9382.  
  9383.  
  9384.  
  9385.  
  9386.    REMARKS:
  9387.  
  9388.         (see TSpreadSheet.ToggleAutoCalc)
  9389.  
  9390.  
  9391.    ************************************************************************
  9392.    TSpreadSheet.BlankArea field
  9393.    ************************************************************************
  9394.    DECLARATION:
  9395.  
  9396.         BlankArea : TScreenArea;
  9397.  
  9398.    UNIT:
  9399.  
  9400.         GLTSHEET.PAS
  9401.  
  9402.    DESCRIPTION:
  9403.  
  9404.         Area of the window that will be left blank when displaying the
  9405.         spreadsheet.
  9406.  
  9407.    REMARKS:
  9408.  
  9409.         A blank area is formed when a column won't fit in the window and will
  9410.         therefore not be displayed, leaving an empty (blank) area in the window.
  9411.  
  9412.         (see TSpreadSheet.DisplayBlankArea)
  9413.  
  9414.  
  9415.    ************************************************************************
  9416.    TSpreadSheet.BlockOn field
  9417.    ************************************************************************
  9418.    DECLARATION:
  9419.  
  9420.         BlockOn : Boolean;
  9421.  
  9422.    UNIT:
  9423.  
  9424.         GLTSHEET.PAS
  9425.  
  9426.    DESCRIPTION:
  9427.  
  9428.         Indicates if a block of cells is currently selected (block mode is on).
  9429.  
  9430.    REMARKS:
  9431.  
  9432.         (see TSpreadSheet.ToggleBlockOn)
  9433.  
  9434.  
  9435.    ************************************************************************
  9436.    TSpreadSheet.CellHash field
  9437.    ************************************************************************
  9438.    DECLARATION:
  9439.  
  9440.         CellHash : TCellHashTable;
  9441.  
  9442.  
  9443.  
  9444.  
  9445.                                         128
  9446.  
  9447.  
  9448.  
  9449.  
  9450.  
  9451.  
  9452.  
  9453.  
  9454.    UNIT:
  9455.  
  9456.         GLTSHEET.PAS
  9457.  
  9458.    DESCRIPTION:
  9459.  
  9460.         Cell hash table that will be used to store the data in the spreadsheet.
  9461.  
  9462.    ************************************************************************
  9463.    TSpreadSheet.CellHashStart function
  9464.    ************************************************************************
  9465.    DECLARATION:
  9466.  
  9467.         function  CellHashStart(TotalCells: LongInt): BucketRange;
  9468.           virtual;
  9469.  
  9470.    UNIT:
  9471.  
  9472.         GLTSHEET.PAS
  9473.  
  9474.    DESCRIPTION:
  9475.  
  9476.         Returns the initial number of buckets the cell hash table will have.
  9477.  
  9478.    PARAMETERS' DESCRIPTION:
  9479.  
  9480.         TotalCells     :    the number of cells that cell hash table will have
  9481.  
  9482.    ************************************************************************
  9483.    TSpreadSheet.CellsProtected function
  9484.    ************************************************************************
  9485.    DECLARATION:
  9486.  
  9487.         function  CellsProtected(Block: TBlock): Boolean; virtual;
  9488.  
  9489.    UNIT:
  9490.  
  9491.         GLTSHEET.PAS
  9492.  
  9493.    DESCRIPTION:
  9494.  
  9495.         Determines if any cell in the given block cannot be modified.
  9496.  
  9497.    PARAMETERS' DESCRIPTION:
  9498.  
  9499.         Block     :    the block to be checked for cells that cannot be modified
  9500.  
  9501.    ************************************************************************
  9502.    TSpreadSheet.CellToFString function
  9503.    ************************************************************************
  9504.    DECLARATION:
  9505.  
  9506.         function  CellToFString(P: CellPos; var AColor: Byte): String;
  9507.           virtual;
  9508.  
  9509.    UNIT:
  9510.  
  9511.         GLTSHEET.PAS
  9512.  
  9513.                                         129
  9514.  
  9515.  
  9516.  
  9517.  
  9518.  
  9519.  
  9520.  
  9521.  
  9522.    DESCRIPTION:
  9523.  
  9524.         Returns the formatted contents of a cell to be displayed in the screen.
  9525.  
  9526.    PARAMETERS' DESCRIPTION:
  9527.  
  9528.         P    :    the position of the cell that will be displayed
  9529.  
  9530.         AColor    :    the color that the cell's contents should be displayed
  9531.                        with
  9532.  
  9533.    ************************************************************************
  9534.    TSpreadSheet.ChangeBounds procedure
  9535.    ************************************************************************
  9536.    DECLARATION:
  9537.  
  9538.         procedure ChangeBounds(var Bounds: TRect); virtual;
  9539.  
  9540.    UNIT:
  9541.  
  9542.         GLTSHEET.PAS
  9543.  
  9544.    DESCRIPTION:
  9545.  
  9546.         Changes the size of the spreadsheet and resets the limits of the
  9547.         scroller.
  9548.  
  9549.    PARAMETERS' DESCRIPTION:
  9550.  
  9551.         Bounds    :    the new area where the spreadsheet will be displayed
  9552.  
  9553.    ************************************************************************
  9554.    TSpreadSheet.ChangeColHeaders procedure
  9555.    ************************************************************************
  9556.    DECLARATION:
  9557.  
  9558.         procedure ChangeColHeaders; virtual;
  9559.  
  9560.    UNIT:
  9561.  
  9562.         GLTSHEET.PAS
  9563.  
  9564.    DESCRIPTION:
  9565.  
  9566.         Assigns a custom header to a column or group of column.
  9567.  
  9568.    REMARKS:
  9569.  
  9570.         This procedure will present the user with a dialog prompting for the new
  9571.         header; if the user enters a valid custom header, it is added to the
  9572.         headers hash table.  If a custom assigned header for the selected column
  9573.         or group of columns already existed, it will be replaced by the new one.
  9574.  
  9575.  
  9576.  
  9577.  
  9578.  
  9579.  
  9580.  
  9581.                                         130
  9582.  
  9583.  
  9584.  
  9585.  
  9586.  
  9587.  
  9588.  
  9589.  
  9590.    ************************************************************************
  9591.    TSpreadSheet.ChangeColWidth procedure
  9592.    ************************************************************************
  9593.    DECLARATION:
  9594.  
  9595.         procedure ChangeColWidth; virtual;
  9596.  
  9597.    UNIT:
  9598.  
  9599.         GLTSHEET.PAS
  9600.  
  9601.    DESCRIPTION:
  9602.  
  9603.         Changes the width of a column or group of columns.
  9604.  
  9605.    REMARKS:
  9606.  
  9607.         This procedure will present the user with a dialog prompting for a new
  9608.         width; if the user enters a valid width, it is added to the width hash
  9609.         table.  If a non-default width already existed for the selected column
  9610.         or group of columns, it will be replaced.  If the user enters the
  9611.         default width for the column, the column will be erased from the width
  9612.         hash table.
  9613.  
  9614.  
  9615.    ************************************************************************
  9616.    TSpreadSheet.CheckForDragging procedure
  9617.    ************************************************************************
  9618.    DECLARATION:
  9619.  
  9620.         procedure CheckForDragging; virtual;
  9621.  
  9622.    UNIT:
  9623.  
  9624.         GLTSHEET.PAS
  9625.  
  9626.    DESCRIPTION:
  9627.  
  9628.         Checks if the cursor is being dragged (with the mouse or by holding the
  9629.         SHIFT key and using the cursor keys), and -- if necessary -- extends (or
  9630.         creates) the block of selected cells, until the cursor is not dragged
  9631.         anymore.
  9632.  
  9633.    ************************************************************************
  9634.    TSpreadSheet.ClearCurrBlock procedure
  9635.    ************************************************************************
  9636.    DECLARATION:
  9637.  
  9638.         procedure ClearCurrBlock; virtual;
  9639.  
  9640.    UNIT:
  9641.  
  9642.         GLTSHEET.PAS
  9643.  
  9644.    DESCRIPTION:
  9645.  
  9646.         Turns off the block mode and redisplays the affected cells.
  9647.  
  9648.  
  9649.                                         131
  9650.  
  9651.  
  9652.  
  9653.  
  9654.  
  9655.  
  9656.  
  9657.  
  9658.    ************************************************************************
  9659.    TSpreadSheet.ClearScreenArea procedure
  9660.    ************************************************************************
  9661.    DECLARATION:
  9662.  
  9663.         procedure ClearScreenArea(AreaToClear: PScreenArea); virtual;
  9664.  
  9665.    UNIT:
  9666.  
  9667.         GLTSHEET.PAS
  9668.  
  9669.    DESCRIPTION:
  9670.  
  9671.         Clears an area of the screen (or window).
  9672.  
  9673.    PARAMETERS' DESCRIPTION:
  9674.  
  9675.         AreaToClear    :    area the will be cleared
  9676.  
  9677.    ************************************************************************
  9678.    TSpreadSheet.ColArea field
  9679.    ************************************************************************
  9680.    DECLARATION:
  9681.  
  9682.         ColArea : TScreenArea;
  9683.  
  9684.    UNIT:
  9685.  
  9686.         GLTSHEET.PAS
  9687.  
  9688.    DESCRIPTION:
  9689.  
  9690.         Area of the window where column headers will be displayed.
  9691.  
  9692.    REMARKS:
  9693.  
  9694.         (see TSpreadSheet.DisplayCols)
  9695.  
  9696.  
  9697.    ************************************************************************
  9698.    TSpreadSheet.ColHeadersHash field
  9699.    ************************************************************************
  9700.    DECLARATION:
  9701.  
  9702.         ColHeadersHash : THeadersHashTable;
  9703.  
  9704.    UNIT:
  9705.  
  9706.         GLTSHEET.PAS
  9707.  
  9708.    DESCRIPTION:
  9709.  
  9710.         Headers hash table that will store custom assigned headers of the
  9711.         columns in the spreadsheet.
  9712.  
  9713.  
  9714.  
  9715.  
  9716.  
  9717.                                         132
  9718.  
  9719.  
  9720.  
  9721.  
  9722.  
  9723.  
  9724.  
  9725.  
  9726.    ************************************************************************
  9727.    TSpreadSheet.ColHeadersHashStart function
  9728.    ************************************************************************
  9729.    DECLARATION:
  9730.  
  9731.         function  ColHeadersHashStart : BucketRange; virtual;
  9732.  
  9733.    UNIT:
  9734.  
  9735.         GLTSHEET.PAS
  9736.  
  9737.    DESCRIPTION:
  9738.  
  9739.         Returns the number of buckets the headers hash table will have.
  9740.  
  9741.    ************************************************************************
  9742.    TSpreadSheet.ColStart field
  9743.    ************************************************************************
  9744.    DECLARATION:
  9745.  
  9746.         ColStart : PColStart;
  9747.  
  9748.    UNIT:
  9749.  
  9750.         GLTSHEET.PAS
  9751.  
  9752.    DESCRIPTION:
  9753.  
  9754.         Pointer to the ColStartArray that will store the screen columns where
  9755.         the columns of the spreadsheet will be displayed.
  9756.  
  9757.    REMARKS:
  9758.  
  9759.         (see ColStartArray)
  9760.  
  9761.  
  9762.    ************************************************************************
  9763.    TSpreadSheet.ColToX function
  9764.    ************************************************************************
  9765.    DECLARATION:
  9766.  
  9767.         function  ColToX(Col: Integer): Byte; virtual;
  9768.  
  9769.    UNIT:
  9770.  
  9771.         GLTSHEET.PAS
  9772.  
  9773.    DESCRIPTION:
  9774.  
  9775.         Returns the position in the window where a given spreadsheet column will
  9776.         be displayed.
  9777.  
  9778.    PARAMETERS' DESCRIPTION:
  9779.  
  9780.         Col  :    the number of the column that will be display
  9781.  
  9782.  
  9783.  
  9784.  
  9785.                                         133
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.  
  9792.  
  9793.  
  9794.    REMARKS:
  9795.  
  9796.         The Col parameter should be the number of a column that is inside the
  9797.         screen block being displayed.
  9798.  
  9799.  
  9800.    ************************************************************************
  9801.    TSpreadSheet.ColumnToString function
  9802.    ************************************************************************
  9803.    DECLARATION:
  9804.  
  9805.         function  ColumnToString(Column: Word): String; virtual;
  9806.  
  9807.    UNIT:
  9808.  
  9809.         GLTSHEET.PAS
  9810.  
  9811.    DESCRIPTION:
  9812.  
  9813.         Converts a given column number to a column letter.
  9814.  
  9815.    PARAMETERS' DESCRIPTION:
  9816.  
  9817.         Column    :    the column number to be converted
  9818.  
  9819.    ************************************************************************
  9820.    TSpreadSheet.ColWidth function
  9821.    ************************************************************************
  9822.    DECLARATION:
  9823.  
  9824.         function  ColWidth(Col: Integer): Byte; virtual;
  9825.  
  9826.    UNIT:
  9827.  
  9828.         GLTSHEET.PAS
  9829.  
  9830.    DESCRIPTION:
  9831.  
  9832.         Returns the width of a given column.
  9833.  
  9834.    PARAMETERS' DESCRIPTION:
  9835.  
  9836.         Col  :    the number of the column whose width will be returned by the
  9837.                   function
  9838.  
  9839.    ************************************************************************
  9840.    TSpreadSheet.ContentsArea field
  9841.    ************************************************************************
  9842.    DECLARATION:
  9843.  
  9844.         ContentsArea : TScreenArea;
  9845.  
  9846.    UNIT:
  9847.  
  9848.         GLTSHEET.PAS
  9849.  
  9850.  
  9851.  
  9852.  
  9853.                                         134
  9854.  
  9855.  
  9856.  
  9857.  
  9858.  
  9859.  
  9860.  
  9861.  
  9862.    DESCRIPTION:
  9863.  
  9864.         Area of the window where the contents of the highlighted cell will be
  9865.         displayed.
  9866.  
  9867.    REMARKS:
  9868.  
  9869.         (see TSpreadSheet.DisplayCellData)
  9870.  
  9871.  
  9872.    ************************************************************************
  9873.    TSpreadSheet.CopyCellBlock procedure
  9874.    ************************************************************************
  9875.    DECLARATION:
  9876.  
  9877.         procedure CopyCellBlock; virtual;
  9878.  
  9879.    UNIT:
  9880.  
  9881.         GLTSHEET.PAS
  9882.  
  9883.    DESCRIPTION:
  9884.  
  9885.         Activates the clipboard and sets it to indicate a copy operation and the
  9886.         block to be copied.
  9887.  
  9888.    REMARKS:
  9889.  
  9890.         The block is not actually copied; the block will be copied when
  9891.         TSpreadSheet's PasteCellBlock method is called.
  9892.  
  9893.  
  9894.    ************************************************************************
  9895.    TSpreadSheet.CurrBlock field
  9896.    ************************************************************************
  9897.    DECLARATION:
  9898.  
  9899.         CurrBlock : PBlock;
  9900.  
  9901.    UNIT:
  9902.  
  9903.         GLTSHEET.PAS
  9904.  
  9905.    DESCRIPTION:
  9906.  
  9907.         The currently selected block of cells (if any).
  9908.  
  9909.    ************************************************************************
  9910.    TSpreadSheet.CurrPos field
  9911.    ************************************************************************
  9912.    DECLARATION:
  9913.  
  9914.         CurrPos : CellPos;
  9915.  
  9916.    UNIT:
  9917.  
  9918.         GLTSHEET.PAS
  9919.  
  9920.  
  9921.                                         135
  9922.  
  9923.  
  9924.  
  9925.  
  9926.  
  9927.  
  9928.  
  9929.  
  9930.    DESCRIPTION:
  9931.  
  9932.         The position of the cursor in the spreadsheet.
  9933.  
  9934.    ************************************************************************
  9935.    TSpreadSheet.DataArea field
  9936.    ************************************************************************
  9937.    DECLARATION:
  9938.  
  9939.         DataArea : TScreenArea;
  9940.  
  9941.    UNIT:
  9942.  
  9943.         GLTSHEET.PAS
  9944.  
  9945.    DESCRIPTION:
  9946.  
  9947.         Area of the window where information about the highlighted cell will be
  9948.         displayed.
  9949.  
  9950.    REMARKS:
  9951.  
  9952.         (see TSpreadSheet.DisplayCellData)
  9953.  
  9954.  
  9955.    ************************************************************************
  9956.    TSpreadSheet.DefaultColWidth field
  9957.    ************************************************************************
  9958.    DECLARATION:
  9959.  
  9960.         DefaultColWidth : Byte;
  9961.  
  9962.    UNIT:
  9963.  
  9964.         GLTSHEET.PAS
  9965.  
  9966.    DESCRIPTION:
  9967.  
  9968.         Default width of the columns in the spreadsheet.
  9969.  
  9970.    ************************************************************************
  9971.    TSpreadSheet.DefaultCurrency field
  9972.    ************************************************************************
  9973.    DECLARATION:
  9974.  
  9975.         DefaultCurrency : CurrencyStr;
  9976.  
  9977.    UNIT:
  9978.  
  9979.         GLTSHEET.PAS
  9980.  
  9981.    DESCRIPTION:
  9982.  
  9983.         This is the currency string that will be used by default when adding a
  9984.         currency character to numbers.
  9985.  
  9986.  
  9987.  
  9988.  
  9989.                                         136
  9990.  
  9991.  
  9992.  
  9993.  
  9994.  
  9995.  
  9996.  
  9997.  
  9998.    ************************************************************************
  9999.    TSpreadSheet.DefaultDecimalPlaces field
  10000.    ************************************************************************
  10001.    DECLARATION:
  10002.  
  10003.         DefaultDecimalPlaces : Byte;
  10004.  
  10005.    UNIT:
  10006.  
  10007.         GLTSHEET.PAS
  10008.  
  10009.    DESCRIPTION:
  10010.  
  10011.         Default number of decimal places a number will be displayed with.
  10012.  
  10013.    ************************************************************************
  10014.    TSpreadSheet.DeleteBlock procedure
  10015.    ************************************************************************
  10016.    DECLARATION:
  10017.  
  10018.         procedure DeleteBlock(Block: TBlock; var Deleted: Boolean);
  10019.           virtual;
  10020.  
  10021.    UNIT:
  10022.  
  10023.         GLTSHEET.PAS
  10024.  
  10025.    DESCRIPTION:
  10026.  
  10027.         Deletes a block of cells from the spreadsheet.
  10028.  
  10029.    PARAMETERS' DESCRIPTION:
  10030.  
  10031.         Block     :    the block to be deleted
  10032.  
  10033.         Deleted   :    after a call to DeleteBlock, this parameter will contain
  10034.                        a boolean value indicating if the cells were successfully
  10035.                        deleted
  10036.  
  10037.    REMARKS:
  10038.  
  10039.         If Deleted contains a FALSE value, it means that either there was an
  10040.         error during the delete operation or the cells did not exist.
  10041.  
  10042.         (see TSpreadSheet.DeleteCell)
  10043.  
  10044.  
  10045.    ************************************************************************
  10046.    TSpreadSheet.DeleteCell procedure
  10047.    ************************************************************************
  10048.    DECLARATION:
  10049.  
  10050.         procedure DeleteCell(Pos: CellPos; var Deleted: Boolean);
  10051.           virtual;
  10052.  
  10053.    UNIT:
  10054.  
  10055.         GLTSHEET.PAS
  10056.  
  10057.                                         137
  10058.  
  10059.  
  10060.  
  10061.  
  10062.  
  10063.  
  10064.  
  10065.  
  10066.    DESCRIPTION:
  10067.  
  10068.         Deletes a cell from the spreadsheet.
  10069.  
  10070.    PARAMETERS' DESCRIPTION:
  10071.  
  10072.         Pos  :    the position of the cell to be deleted
  10073.  
  10074.         Deleted   :    after a call to DeleteCell, this parameter will contain a
  10075.                        boolean value indicating if the cell was sucessfully
  10076.                        deleted
  10077.  
  10078.    REMARKS:
  10079.  
  10080.         If Deleted contains a FALSE value, it means that either there was an
  10081.         error during the delete operation or the cell did not exist.
  10082.  
  10083.  
  10084.    ************************************************************************
  10085.    TSpreadSheet.DeleteColFromHash procedure
  10086.    ************************************************************************
  10087.    DECLARATION:
  10088.  
  10089.         procedure DeleteColFromHash(Block: TBlock; Columns, EndDelCol:
  10090.           Word; var Deleted: Boolean); virtual;
  10091.  
  10092.    UNIT:
  10093.  
  10094.         GLTSHEET.PAS
  10095.  
  10096.    DESCRIPTION:
  10097.  
  10098.         Deletes a column or block of columns from the spreadsheet's hash tables.
  10099.  
  10100.    PARAMETERS' DESCRIPTION:
  10101.  
  10102.         Block     :    the block of cells that will be deleted
  10103.  
  10104.         Columns   :    the number of columns that will be deleted
  10105.  
  10106.         EndDelCol :    the number of the right most column in the block of
  10107.                        columns that will deleted
  10108.  
  10109.         Deleted   :    after a call to DeleteColFromHash, this parameter will
  10110.                        contain a boolean value indicating if the cells where
  10111.                        sucessfully deleted (see TSpreadSheet.DeleteBlock)
  10112.  
  10113.    REMARKS:
  10114.  
  10115.         (see TSpreadSheet.DeleteColumns)
  10116.  
  10117.  
  10118.    ************************************************************************
  10119.    TSpreadSheet.DeleteColHeaders procedure
  10120.    ************************************************************************
  10121.    DECLARATION:
  10122.  
  10123.         procedure DeleteColHeaders(Block: PBlock); virtual;
  10124.  
  10125.                                            138
  10126.  
  10127.  
  10128.  
  10129.  
  10130.  
  10131.  
  10132.  
  10133.  
  10134.    UNIT:
  10135.  
  10136.         GLTSHEET.PAS
  10137.  
  10138.    DESCRIPTION:
  10139.  
  10140.         Deletes the custom assigned headers of a block of columns from the
  10141.         headers hash table.
  10142.  
  10143.    PARAMETERS' DESCRIPTION:
  10144.  
  10145.         Block     :    the block of columns whose headers will be delete
  10146.  
  10147.    ************************************************************************
  10148.    TSpreadSheet.DeleteColumns procedure
  10149.    ************************************************************************
  10150.    DECLARATION:
  10151.  
  10152.         procedure DeleteColumns; virtual;
  10153.  
  10154.    UNIT:
  10155.  
  10156.         GLTSHEET.PAS
  10157.  
  10158.    DESCRIPTION:
  10159.  
  10160.         Deletes a column or block of columns from the spreadsheet.
  10161.  
  10162.    REMARKS:
  10163.  
  10164.         (see TSpreadSheet.DeleteColFromHash)
  10165.  
  10166.  
  10167.    ************************************************************************
  10168.    TSpreadSheet.DeleteRowFromHash procedure
  10169.    ************************************************************************
  10170.    DECLARATION:
  10171.  
  10172.         procedure DeleteRowFromHash(Block: TBlock; Rows, EndDelRow:
  10173.           Word; var Deleted: Boolean); virtual;
  10174.  
  10175.    UNIT:
  10176.  
  10177.         GLTSHEET.PAS
  10178.  
  10179.    DESCRIPTION:
  10180.  
  10181.         Deletes a row or block of rows from the spreadsheet's hash tables.
  10182.  
  10183.    PARAMETERS' DESCRIPTION:
  10184.  
  10185.         Block     :    the block of cells that will be deleted
  10186.  
  10187.         Rows :    the number of rows that will be deleted
  10188.  
  10189.         EndDelRow :    the number of the last row in the block of rows that will
  10190.                        be deleted
  10191.  
  10192.  
  10193.                                            139
  10194.  
  10195.  
  10196.  
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.         Deleted   :    after a call to DeleteRowFromHash, this parameter will
  10203.                        contain a boolean value indicating if the cells where
  10204.                        sucessfully deleted (see TSpreadSheet.DeleteBlock)
  10205.  
  10206.    REMARKS:
  10207.  
  10208.         (see TSpreadSheet.DeleteRows)
  10209.  
  10210.  
  10211.    ************************************************************************
  10212.    TSpreadSheet.DeleteRows procedure
  10213.    ************************************************************************
  10214.    DECLARATION:
  10215.  
  10216.         procedure DeleteRows; virtual;
  10217.  
  10218.    UNIT:
  10219.  
  10220.         GLTSHEET.PAS
  10221.  
  10222.    DESCRIPTION:
  10223.  
  10224.         Deletes a row or block of columns from the spreadsheet.
  10225.  
  10226.    REMARKS:
  10227.  
  10228.         (see TSpreadSheet.DeleteRowFromHash)
  10229.  
  10230.  
  10231.    ************************************************************************
  10232.    TSpreadSheet.DisplayAllCells procedure
  10233.    ************************************************************************
  10234.    DECLARATION:
  10235.  
  10236.         procedure DisplayAllCells; virtual;
  10237.  
  10238.    UNIT:
  10239.  
  10240.         GLTSHEET.PAS
  10241.  
  10242.    DESCRIPTION:
  10243.  
  10244.         Displays all the cells in the current screen block.
  10245.  
  10246.    REMARKS:
  10247.  
  10248.         (see TSpreadSheet.ScreenBlock)
  10249.  
  10250.  
  10251.    ************************************************************************
  10252.    TSpreadSheet.DisplayArea field
  10253.    ************************************************************************
  10254.    DECLARATION:
  10255.  
  10256.         DisplayArea : TScreenArea;
  10257.  
  10258.  
  10259.  
  10260.  
  10261.                                         140
  10262.  
  10263.  
  10264.  
  10265.  
  10266.  
  10267.  
  10268.  
  10269.  
  10270.    UNIT:
  10271.  
  10272.         GLTSHEET.PAS
  10273.  
  10274.    DESCRIPTION:
  10275.  
  10276.         Area of the window where the data in the spreadsheet will be displayed.
  10277.  
  10278.    REMARKS:
  10279.  
  10280.         (see TSpreadSheet.DisplayAllCells)
  10281.  
  10282.  
  10283.    ************************************************************************
  10284.    TSpreadSheet.DisplayBlankArea procedure
  10285.    ************************************************************************
  10286.    DECLARATION:
  10287.  
  10288.         procedure DisplayBlankArea; virtual;
  10289.  
  10290.    UNIT:
  10291.  
  10292.         GLTSHEET.PAS
  10293.  
  10294.    DESCRIPTION:
  10295.  
  10296.         Clears the empty area in the spreadsheet.
  10297.  
  10298.    REMARKS:
  10299.  
  10300.         (see TSpreadSheet.ClearScreenArea, TSpreadSheet.BlankArea)
  10301.  
  10302.  
  10303.    ************************************************************************
  10304.    TSpreadSheet.DisplayBlock procedure
  10305.    ************************************************************************
  10306.    DECLARATION:
  10307.  
  10308.         procedure DisplayBlock(B: TBlock); virtual;
  10309.  
  10310.    UNIT:
  10311.  
  10312.         GLTSHEET.PAS
  10313.  
  10314.    DESCRIPTION:
  10315.  
  10316.         Displays a block of cells.
  10317.  
  10318.    PARAMETERS' DESCRIPTION:
  10319.  
  10320.         Block     :    the block of cells that should be displayed
  10321.  
  10322.    REMARKS:
  10323.  
  10324.         Only cells in the current screen block will be displayed.
  10325.  
  10326.         (see TSpreadSheet.ScreenBlock, TSpreadSheet.DisplayCellBlock)
  10327.  
  10328.  
  10329.                                         141
  10330.  
  10331.  
  10332.  
  10333.  
  10334.  
  10335.  
  10336.  
  10337.  
  10338.    ************************************************************************
  10339.    TSpreadSheet.DisplayBlockDiff procedure
  10340.    ************************************************************************
  10341.    DECLARATION:
  10342.  
  10343.         procedure DisplayBlockDiff(B1, B2: TBlock); virtual;
  10344.  
  10345.    UNIT:
  10346.  
  10347.         GLTSHEET.PAS
  10348.  
  10349.    DESCRIPTION:
  10350.  
  10351.         Displays the cells present in one block, not present in the another
  10352.         block.
  10353.  
  10354.    PARAMETERS' DESCRIPTION:
  10355.  
  10356.         B1   :    the reference block
  10357.  
  10358.         B2   :    cells in this block not present in the reference block (B1)
  10359.                   will be displayed.
  10360.  
  10361.    ************************************************************************
  10362.    TSpreadSheet.DisplayCell procedure
  10363.    ************************************************************************
  10364.    DECLARATION:
  10365.  
  10366.         procedure DisplayCell(P: CellPos); virtual;
  10367.  
  10368.    UNIT:
  10369.  
  10370.         GLTSHEET.PAS
  10371.  
  10372.    DESCRIPTION:
  10373.  
  10374.         Displays a single cell.
  10375.  
  10376.    PARAMETERS' DESCRIPTION:
  10377.  
  10378.         P    :    the position of the cell to be displayed
  10379.  
  10380.    REMARKS:
  10381.  
  10382.         The cell must be inside the current screen block.
  10383.  
  10384.         (see TSpreadSheet.ScreenBlock)
  10385.  
  10386.  
  10387.    ************************************************************************
  10388.    TSpreadSheet.DisplayCellBlock procedure
  10389.    ************************************************************************
  10390.    DECLARATION:
  10391.  
  10392.         procedure DisplayCellBlock(C1, R1, C2, R2: Word); virtual;
  10393.  
  10394.  
  10395.  
  10396.  
  10397.                                         142
  10398.  
  10399.  
  10400.  
  10401.  
  10402.  
  10403.  
  10404.  
  10405.  
  10406.    UNIT:
  10407.  
  10408.         GLTSHEET.PAS
  10409.  
  10410.    DESCRIPTION:
  10411.  
  10412.         Displays a block of cells.
  10413.  
  10414.    PARAMETERS' DESCRIPTION:
  10415.  
  10416.         C1   :    the column number of the upper left corner of the block of
  10417.                   cells to be displayed
  10418.  
  10419.         R1   :    the row number of the upper left corner of the block of cells
  10420.                   to be displayed
  10421.  
  10422.         C2   :    the column number of the lower right corner of the block of
  10423.                   cells to be displayed
  10424.  
  10425.         R2   :    the row number of the lower right corner of the block of cells
  10426.                   to be displayed
  10427.  
  10428.    REMARKS:
  10429.  
  10430.         Only cells in the current screen block will be displayed.
  10431.  
  10432.         (see TSpreadSheet.ScreenBlock)
  10433.  
  10434.  
  10435.    ************************************************************************
  10436.    TSpreadSheet.DisplayCellData procedure
  10437.    ************************************************************************
  10438.    DECLARATION:
  10439.  
  10440.         procedure DisplayCellData; virtual;
  10441.  
  10442.    UNIT:
  10443.  
  10444.         GLTSHEET.PAS
  10445.  
  10446.    DESCRIPTION:
  10447.  
  10448.         Displays the highlighted cell's information and contents.
  10449.  
  10450.    ************************************************************************
  10451.    TSpreadSheet.DisplayCols procedure
  10452.    ************************************************************************
  10453.    DECLARATION:
  10454.  
  10455.         procedure DisplayCols; virtual;
  10456.  
  10457.    UNIT:
  10458.  
  10459.         GLTSHEET.PAS
  10460.  
  10461.    DESCRIPTION:
  10462.  
  10463.         Displays the headers of the columns in the current screen block.
  10464.  
  10465.                                            143
  10466.  
  10467.  
  10468.  
  10469.  
  10470.  
  10471.  
  10472.  
  10473.  
  10474.    REMARKS:
  10475.  
  10476.         (see TSpreadSheet.ScreenBlock)
  10477.  
  10478.  
  10479.    ************************************************************************
  10480.    TSpreadSheet.DisplayFormulas field
  10481.    ************************************************************************
  10482.    DECLARATION:
  10483.  
  10484.         DisplayFormulas : Boolean;
  10485.  
  10486.    UNIT:
  10487.  
  10488.         GLTSHEET.PAS
  10489.  
  10490.    DESCRIPTION:
  10491.  
  10492.         Indicates if formulas (not their results) should be displayed in the
  10493.         spreadsheet (i.e. Indicates if the spreadsheet is in Display Formulas
  10494.         mode).
  10495.  
  10496.    REMARKS:
  10497.  
  10498.         (see TSpreadSheet.ToggleDisplayFormulas)
  10499.  
  10500.  
  10501.    ************************************************************************
  10502.    TSpreadSheet.DisplayHeaders field
  10503.    ************************************************************************
  10504.    DECLARATION:
  10505.  
  10506.         DisplayHeaders : Boolean;
  10507.  
  10508.    UNIT:
  10509.  
  10510.         GLTSHEET.PAS
  10511.  
  10512.    DESCRIPTION:
  10513.  
  10514.         Indicates if custom assigned headers should be displayed (i.e. Indicates
  10515.         if the spreadsheet is in Display Headers mode)
  10516.  
  10517.    REMARKS:
  10518.  
  10519.         (see ToggleDisplayHeaders)
  10520.  
  10521.  
  10522.    ************************************************************************
  10523.    TSpreadSheet.DisplayInfo procedure
  10524.    ************************************************************************
  10525.    DECLARATION:
  10526.  
  10527.         procedure DisplayInfo; virtual;
  10528.  
  10529.    UNIT:
  10530.  
  10531.         GLTSHEET.PAS
  10532.  
  10533.                                         144
  10534.  
  10535.  
  10536.  
  10537.  
  10538.  
  10539.  
  10540.  
  10541.  
  10542.    DESCRIPTION:
  10543.  
  10544.         Displays the spreadsheet's information characters in the info area.
  10545.  
  10546.    ************************************************************************
  10547.    TSpreadSheet.DisplayRows procedure
  10548.    ************************************************************************
  10549.    DECLARATION:
  10550.  
  10551.         procedure DisplayRows; virtual;
  10552.  
  10553.    UNIT:
  10554.  
  10555.         GLTSHEET.PAS
  10556.  
  10557.    DESCRIPTION:
  10558.  
  10559.         Displays the row numbers of the rows in the current screen block.
  10560.  
  10561.    REMARKS:
  10562.  
  10563.         (see TSpreadSheet.ScreenBlock)
  10564.  
  10565.  
  10566.    ************************************************************************
  10567.    TSpreadSheet.DoAfterEndInput procedure
  10568.    ************************************************************************
  10569.    DECLARATION:
  10570.  
  10571.         procedure DoAfterEndInput; virtual;
  10572.  
  10573.    UNIT:
  10574.  
  10575.         GLTSHEET.PAS
  10576.  
  10577.    DESCRIPTION:
  10578.  
  10579.         This procedure is always called after a cell is added or modified.
  10580.  
  10581.    REMARKS:
  10582.  
  10583.         This is a very important procedure when creating data entry screens.  By
  10584.         overriding this method, you can control what happens after a cell is
  10585.         added or modified.  For example, you can add additional data to the
  10586.         spreadsheet when a particular cell is added; or you can decide when to
  10587.         move the cursor left and when to move the cursor to the next line,
  10588.         depending on the position of the cell that was added or modified (stored
  10589.         in the CurrPos field).
  10590.  
  10591.         (see TSpreadSheet.HandleInput)
  10592.  
  10593.  
  10594.    ************************************************************************
  10595.    TSpreadSheet.Done DESTRUCTOR
  10596.    ************************************************************************
  10597.    DECLARATION:
  10598.  
  10599.         destructor Done; virtual;
  10600.  
  10601.                                            145
  10602.  
  10603.  
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.    UNIT:
  10611.  
  10612.         GLTSHEET.PAS
  10613.  
  10614.    DESCRIPTION:
  10615.  
  10616.         Performs the necessary clean up and disposal of the spreadsheet.
  10617.  
  10618.    ************************************************************************
  10619.    TSpreadSheet.DoneHashTables procedure
  10620.    ************************************************************************
  10621.    DECLARATION:
  10622.  
  10623.         procedure DoneHashTables; virtual;
  10624.  
  10625.    UNIT:
  10626.  
  10627.         GLTSHEET.PAS
  10628.  
  10629.    DESCRIPTION:
  10630.  
  10631.         Performs the necessary clean up and disposal of the spreadsheet's hash
  10632.         tables.
  10633.  
  10634.    ************************************************************************
  10635.    TSpreadSheet.DragCursorWithMouse procedure
  10636.    ************************************************************************
  10637.    DECLARATION:
  10638.  
  10639.         procedure DragCursorWithMouse(Event: TEvent); virtual;
  10640.  
  10641.    UNIT:
  10642.  
  10643.         GLTSHEET.PAS
  10644.  
  10645.    DESCRIPTION:
  10646.  
  10647.         Sets block mode on and extends the block to wherever the mouse is
  10648.         pointing.
  10649.  
  10650.    PARAMETERS' DESCRIPTION:
  10651.  
  10652.         Event     :    the mouse event triggered by the movement of the mouse.
  10653.  
  10654.    REMARKS:
  10655.  
  10656.         (see CheckForDragging)
  10657.  
  10658.  
  10659.    ************************************************************************
  10660.    TSpreadSheet.Draw procedure
  10661.    ************************************************************************
  10662.    DECLARATION:
  10663.  
  10664.         procedure Draw; virtual;
  10665.  
  10666.  
  10667.  
  10668.  
  10669.                                         146
  10670.  
  10671.  
  10672.  
  10673.  
  10674.  
  10675.  
  10676.  
  10677.  
  10678.    UNIT:
  10679.  
  10680.         GLTSHEET.PAS
  10681.  
  10682.    DESCRIPTION:
  10683.  
  10684.         Sets the spreadsheet's areas and draws all of the spreadsheet's
  10685.         components.
  10686.  
  10687.    ************************************************************************
  10688.    TSpreadSheet.EmptyRowsAtBottom field
  10689.    ************************************************************************
  10690.    DECLARATION:
  10691.  
  10692.         EmptyRowsAtBottom : Byte;
  10693.  
  10694.    UNIT:
  10695.  
  10696.         GLTSHEET.PAS
  10697.  
  10698.    DESCRIPTION:
  10699.  
  10700.         Number of rows that will be left empty at the bottom of the window.
  10701.  
  10702.    REMARKS:
  10703.  
  10704.         Useful if you want to display additional information in the window.
  10705.  
  10706.         (see TSpreadSheet.EmptyRowsAtTop)
  10707.  
  10708.  
  10709.    ************************************************************************
  10710.    TSpreadSheet.EmptyRowsAtTop field
  10711.    ************************************************************************
  10712.    DECLARATION:
  10713.  
  10714.         EmptyRowsAtTop : Byte;
  10715.  
  10716.    UNIT:
  10717.  
  10718.         GLTSHEET.PAS
  10719.  
  10720.    DESCRIPTION:
  10721.  
  10722.         Number of rows that will be left empty at the top of the window.
  10723.  
  10724.    REMARKS:
  10725.  
  10726.         Useful if you want to display additional information in the window.
  10727.  
  10728.         (see TSpreadSheet.EmptyRowsAtBottom)
  10729.  
  10730.  
  10731.  
  10732.  
  10733.  
  10734.  
  10735.  
  10736.  
  10737.                                         147
  10738.  
  10739.  
  10740.  
  10741.  
  10742.  
  10743.  
  10744.  
  10745.  
  10746.    ************************************************************************
  10747.    TSpreadSheet.EraseCellBlock procedure
  10748.    ************************************************************************
  10749.    DECLARATION:
  10750.  
  10751.         procedure EraseCellBlock(EraseBlock: Boolean); virtual;
  10752.  
  10753.    UNIT:
  10754.  
  10755.         GLTSHEET.PAS
  10756.  
  10757.    DESCRIPTION:
  10758.  
  10759.         Deletes a cell or block of cells; verifies that none of the cells being
  10760.         deleted is protected before actually deleting the cells.
  10761.  
  10762.    PARAMETERS' DESCRIPTION:
  10763.  
  10764.         EraseBlock     :    indicates whether a single cell or a block of cells
  10765.                             is being deleted
  10766.  
  10767.    ************************************************************************
  10768.    TSpreadSheet.ExtendCurrBlock procedure
  10769.    ************************************************************************
  10770.    DECLARATION:
  10771.  
  10772.         procedure ExtendCurrBlock(Redraw : Boolean); virtual;
  10773.  
  10774.    UNIT:
  10775.  
  10776.         GLTSHEET.PAS
  10777.  
  10778.    DESCRIPTION:
  10779.  
  10780.         If block mode is on, then the current block is extended to where the
  10781.         cursor is located.
  10782.  
  10783.    PARAMETERS' DESCRIPTION:
  10784.  
  10785.         Redraw    :    indicates if affected cells should be redrawn.
  10786.  
  10787.    ************************************************************************
  10788.    TSpreadSheet.FindLastPos procedure
  10789.    ************************************************************************
  10790.    DECLARATION:
  10791.  
  10792.         procedure FindLastPos(DPos: CellPos); virtual;
  10793.  
  10794.    UNIT:
  10795.  
  10796.         GLTSHEET.PAS
  10797.  
  10798.    DESCRIPTION:
  10799.  
  10800.         Determines the lower right corner of the block of cells actually used in
  10801.         the spreadsheet.
  10802.  
  10803.  
  10804.  
  10805.                                         148
  10806.  
  10807.  
  10808.  
  10809.  
  10810.  
  10811.  
  10812.  
  10813.  
  10814.    PARAMETERS' DESCRIPTION:
  10815.  
  10816.         DPos :    position used as a reference to find the position being
  10817.                   searched.
  10818.  
  10819.    REMARKS:
  10820.  
  10821.         The reference position is always the position of the cell (or block of
  10822.         cells) that was most recently modified.
  10823.  
  10824.  
  10825.    ************************************************************************
  10826.    TSpreadSheet.FindScreenColStart procedure
  10827.    ************************************************************************
  10828.    DECLARATION:
  10829.  
  10830.         procedure FindScreenColStart; virtual;
  10831.  
  10832.    UNIT:
  10833.  
  10834.         GLTSHEET.PAS
  10835.  
  10836.    DESCRIPTION:
  10837.  
  10838.         Finds the starting column of the screen block when the ending column is
  10839.         known.
  10840.  
  10841.    REMARKS:
  10842.  
  10843.         The ending column used is the last column of the current screen block.
  10844.  
  10845.         (see TSpreadSheet.FindScreenColStop, TSpreadSheet.SetScreenColStart,
  10846.         TSpreadSheet.SetScreenColStop)
  10847.  
  10848.  
  10849.    ************************************************************************
  10850.    TSpreadSheet.FindScreenColStop procedure
  10851.    ************************************************************************
  10852.    DECLARATION:
  10853.  
  10854.         procedure FindScreenColStop; virtual;
  10855.  
  10856.    UNIT:
  10857.  
  10858.         GLTSHEET.PAS
  10859.  
  10860.    DESCRIPTION:
  10861.  
  10862.         Finds the ending column of the screen block when the starting column is
  10863.         known.
  10864.  
  10865.    REMARKS:
  10866.  
  10867.         The starting column used is the first column of the current screen
  10868.         block.
  10869.  
  10870.         (see TSpreadSheet.FindScreenColStart, TSpreadSheet.SetScreenColStart,
  10871.         TSpreadSheet.SetScreenColStop)
  10872.  
  10873.                                            149
  10874.  
  10875.  
  10876.  
  10877.  
  10878.  
  10879.  
  10880.  
  10881.  
  10882.  
  10883.    ************************************************************************
  10884.    TSpreadSheet.FindScreenRowStop procedure
  10885.    ************************************************************************
  10886.    DECLARATION:
  10887.  
  10888.         procedure FindScreenRowStop; virtual;
  10889.  
  10890.    UNIT:
  10891.  
  10892.         GLTSHEET.PAS
  10893.  
  10894.    DESCRIPTION:
  10895.  
  10896.         Finds the ending row of the screen block when the starting row is known.
  10897.  
  10898.    REMARKS:
  10899.  
  10900.         The starting row used is the first row of the current screen block.
  10901.  
  10902.         (see TSpreadSheet.FindScreenRowStart, TSpreadSheet.SetScreenRowStart,
  10903.         TSpreadSheet.SetScreenRowStop)
  10904.  
  10905.  
  10906.    ************************************************************************
  10907.    TSpreadSheet.FindScreenRowStart procedure
  10908.    ************************************************************************
  10909.    DECLARATION:
  10910.  
  10911.         procedure FindScreenRowStart; virtual;
  10912.  
  10913.    UNIT:
  10914.  
  10915.         GLTSHEET.PAS
  10916.  
  10917.    DESCRIPTION:
  10918.  
  10919.         Finds the starting row of the screen block when the ending row is known.
  10920.  
  10921.    REMARKS:
  10922.  
  10923.         The ending row used is the last row of the current screen block.
  10924.  
  10925.         (see TSpreadSheet.FindScreenRowStop, TSpreadSheet.SetScreenRowStart,
  10926.         TSpreadSheet.SetScreenRowStop)
  10927.  
  10928.  
  10929.    ************************************************************************
  10930.    TSpreadSheet.FixBlockOverWrite procedure
  10931.    ************************************************************************
  10932.    DECLARATION:
  10933.  
  10934.         procedure FixBlockOverWrite(Block: TBlock); virtual;
  10935.  
  10936.    UNIT:
  10937.  
  10938.         GLTSHEET.PAS
  10939.  
  10940.  
  10941.                                         150
  10942.  
  10943.  
  10944.  
  10945.  
  10946.  
  10947.  
  10948.  
  10949.  
  10950.    DESCRIPTION:
  10951.  
  10952.         Updates the overwrite information for the given block of cells.
  10953.  
  10954.    PARAMETERS' DESCRIPTION:
  10955.  
  10956.         Block     :    the block of cells whose overwrite information will be
  10957.                        updated
  10958.  
  10959.    REMARKS:
  10960.  
  10961.         IMPORTANT : No memory checking is done since it is assumed that no cells
  10962.         were added to the block of cells being updated; therefore, if new
  10963.         information must be added and there is not enought memory to do it, you
  10964.         will start receiving 'Out of memory' messages for each piece of
  10965.         overwrite information that cannot be added to the overwrite hash table.
  10966.  
  10967.  
  10968.    ************************************************************************
  10969.    TSpreadSheet.FixOverWrite function
  10970.    ************************************************************************
  10971.    DECLARATION:
  10972.  
  10973.         function  FixOverWrite: Boolean; virtual;
  10974.  
  10975.    UNIT:
  10976.  
  10977.         GLTSHEET.PAS
  10978.  
  10979.    DESCRIPTION:
  10980.  
  10981.         Updates the overwrite information for each cell in the spreadsheet.
  10982.  
  10983.    REMARKS:
  10984.  
  10985.         If the operation was completed sucessfully, this function will return
  10986.         TRUE; it will return FALSE otherwise.
  10987.  
  10988.  
  10989.    ************************************************************************
  10990.    TSpreadSheet.FormatDefault procedure
  10991.    ************************************************************************
  10992.    DECLARATION:
  10993.  
  10994.         procedure FormatDefault; virtual;
  10995.  
  10996.    UNIT:
  10997.  
  10998.         GLTSHEET.PAS
  10999.  
  11000.    DESCRIPTION:
  11001.  
  11002.         Erases all format information for a cell or block of cells from the
  11003.         format hash table.
  11004.  
  11005.  
  11006.  
  11007.  
  11008.  
  11009.                                         151
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.    ************************************************************************
  11019.    TSpreadSheet.FormulaHash field
  11020.    ************************************************************************
  11021.    DECLARATION:
  11022.  
  11023.         FormatHash : TFormatHashTable;
  11024.  
  11025.    UNIT:
  11026.  
  11027.         GLTSHEET.PAS
  11028.  
  11029.    DESCRIPTION:
  11030.  
  11031.         Format hash table that will be used to store the formats for blocks of
  11032.         cells in the spreadsheet.
  11033.  
  11034.    ************************************************************************
  11035.    TSpreadSheet.FStringSituationColor function
  11036.    ************************************************************************
  11037.    DECLARATION:
  11038.  
  11039.         function  FStringSituationColor(P: CellPos; var CP: PCell; var
  11040.           HasError, ColorFound: Boolean): Byte; virtual;
  11041.  
  11042.    UNIT:
  11043.  
  11044.         GLTSHEET.PAS
  11045.  
  11046.    DESCRIPTION:
  11047.  
  11048.         Returns a situation especific color for the string to be displayed in
  11049.         the spreadsheet (e.g. highlighted cell color, cell in block color,
  11050.         etc.).
  11051.  
  11052.    PARAMETERS' DESCRIPTION:
  11053.  
  11054.         P    :    the position of the cell whose contents are being displayed in
  11055.                   the screen.
  11056.  
  11057.         CP   :    after a call to this function, this parameter will contain a
  11058.                   pointer to the cell in the given position
  11059.  
  11060.         HasError  :    after a call to this function, this parameter will
  11061.                        indicate if the cell's contents have a numeric error
  11062.  
  11063.         ColorFound     :    after a call to this function, this parameter will
  11064.                             indicate if a situation especific color was found
  11065.                             for the cell at the given position.
  11066.  
  11067.    ************************************************************************
  11068.    TSpreadSheet.GetFormat procedure
  11069.    ************************************************************************
  11070.    DECLARATION:
  11071.  
  11072.         procedure GetFormat; virtual;
  11073.  
  11074.  
  11075.  
  11076.  
  11077.                                         152
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.    UNIT:
  11087.  
  11088.         GLTSHEET.PAS
  11089.  
  11090.    DESCRIPTION:
  11091.  
  11092.         Prompts the user for a new format and if a valid format is returned, it
  11093.         will be added to the format hash table.
  11094.  
  11095.    ************************************************************************
  11096.    TSpreadSheet.GetPalette function
  11097.    ************************************************************************
  11098.    DECLARATION:
  11099.  
  11100.         function  GetPalette: PPalette; virtual;
  11101.  
  11102.    UNIT:
  11103.  
  11104.         GLTSHEET.PAS
  11105.  
  11106.    DESCRIPTION:
  11107.  
  11108.         Returns a pointer to the object's new palette.
  11109.  
  11110.    REMARKS:
  11111.  
  11112.         (see CSpreadSheet)
  11113.  
  11114.  
  11115.    ************************************************************************
  11116.    TSpreadSheet.GoToCell procedure
  11117.    ************************************************************************
  11118.    DECLARATION:
  11119.  
  11120.         procedure GoToCell; virtual;
  11121.  
  11122.    UNIT:
  11123.  
  11124.         GLTSHEET.PAS
  11125.  
  11126.    DESCRIPTION:
  11127.  
  11128.         Prompts the user for a destination position and if a valid cell address
  11129.         is returned, the cursor is moved to that address.
  11130.  
  11131.    ************************************************************************
  11132.    TSpreadSheet.GoToEnd field
  11133.    ************************************************************************
  11134.    DECLARATION:
  11135.  
  11136.         GoToEnd : Boolean;
  11137.  
  11138.    UNIT:
  11139.  
  11140.         GLTSHEET.PAS
  11141.  
  11142.  
  11143.  
  11144.  
  11145.                                         153
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.  
  11152.  
  11153.  
  11154.    DESCRIPTION:
  11155.  
  11156.         Indicates if the END key was pressed.
  11157.  
  11158.    REMARKS:
  11159.  
  11160.         When GoToEnd is true, pressing one of the cursor keys will move the
  11161.         cursor to the end of the spreadsheet in the direction of the cursor key
  11162.         pressed.
  11163.  
  11164.         (see TSpreadSheet.ToggleEnd)
  11165.  
  11166.  
  11167.    ************************************************************************
  11168.    TSpreadSheet.HandleEvent procedure
  11169.    ************************************************************************
  11170.    DECLARATION:
  11171.  
  11172.         procedure HandleEvent(var Event: TEvent); virtual;
  11173.  
  11174.    UNIT:
  11175.  
  11176.         GLTSHEET.PAS
  11177.  
  11178.    DESCRIPTION:
  11179.  
  11180.         Implements the object's event handling.
  11181.  
  11182.    PARAMETERS' DESCRIPTION:
  11183.  
  11184.         Event     :    the event that will be evaluated and, if possible,
  11185.                        handled by this method
  11186.  
  11187.    REMARKS:
  11188.  
  11189.         This method handles keyboard events (cursor keys, ESC, END and ENTER) by
  11190.         moving the spreadsheet's cursor and -- when the clipboard is active --
  11191.         by pasting blocks of cells, mouse double clicks by changing a column's
  11192.         header, mouse clicks and dragging by moving the cursor to the clicked
  11193.         position (and extending the block of selected cells to that position
  11194.         when the cursor is being dragged) and several command events (see
  11195.         cmXXXX).
  11196.  
  11197.  
  11198.    ************************************************************************
  11199.    TSpreadSheet.HandleInput procedure
  11200.    ************************************************************************
  11201.    DECLARATION:
  11202.  
  11203.         procedure HandleInput(FirstChar: String; Editing: Boolean);
  11204.           virtual;
  11205.  
  11206.    UNIT:
  11207.  
  11208.         GLTSHEET.PAS
  11209.  
  11210.  
  11211.  
  11212.  
  11213.                                         154
  11214.  
  11215.  
  11216.  
  11217.  
  11218.  
  11219.  
  11220.  
  11221.  
  11222.    DESCRIPTION:
  11223.  
  11224.         Gets data from the user, validates it and creates and adds the
  11225.         corresponding cell to store the data.
  11226.  
  11227.    PARAMETERS' DESCRIPTION:
  11228.  
  11229.         FirstChar :    this parameter should contain the first typed character
  11230.                        when creating a new cell, or the cell's previous contents
  11231.                        when editing the cell.
  11232.  
  11233.         Editing   :    indicates if the cell's contents are being edited and not
  11234.                        created from scratch.
  11235.  
  11236.    REMARKS:
  11237.  
  11238.         (see TSpreadSheet.DoAfterEndInput)
  11239.  
  11240.  
  11241.    ************************************************************************
  11242.    TSpreadSheet.InfoArea field
  11243.    ************************************************************************
  11244.    DECLARATION:
  11245.  
  11246.         InfoArea : TScreenArea;
  11247.  
  11248.    UNIT:
  11249.  
  11250.         GLTSHEET.PAS
  11251.  
  11252.    DESCRIPTION:
  11253.  
  11254.         Area of the window where information about the spreadsheet (number and
  11255.         modes) will be displayed.
  11256.  
  11257.    REMARKS:
  11258.  
  11259.         (see TSpreadSheet.DisplayInfo)
  11260.  
  11261.  
  11262.    ************************************************************************
  11263.    TSpreadSheet.Init CONSTRUCTOR
  11264.    ************************************************************************
  11265.    DECLARATION:
  11266.  
  11267.         constructor Init(var Bounds: TRect; InitCells: LongInt;
  11268.           AEmptyRowsAtTop, AEmptyRowsAtBottom: Byte; AHScrollBar,
  11269.           AVScrollBar: PLimScrollBar; AInitMaxCols, AInitMaxRows:
  11270.           Integer; InitDefaultColWidth, InitDefaultDecimalPlaces,
  11271.           InitMaxDecimalPlaces: Byte; InitDefaultCurrency:
  11272.           CurrencyStr);
  11273.  
  11274.    UNIT:
  11275.  
  11276.         GLTSHEET.PAS
  11277.  
  11278.  
  11279.  
  11280.  
  11281.                                         155
  11282.  
  11283.  
  11284.  
  11285.  
  11286.  
  11287.  
  11288.  
  11289.  
  11290.    DESCRIPTION:
  11291.  
  11292.         Creates and initializes the TSpreadSheet object.
  11293.  
  11294.    PARAMETERS' DESCRIPTION:
  11295.  
  11296.         Bounds    :    the area where the spreadsheet will be displayed (should
  11297.                        be the all area of the window; the area where the
  11298.                        spreadsheet is displayed can be reduced using the
  11299.                        AEmptyRowsAtTop and AEmptyRowsAtBottom parameters)
  11300.  
  11301.         InitCells :    the number of used cells the spreadsheet has (might be
  11302.                        non-cero when loading from disk)
  11303.  
  11304.         AEmptyRowsAtTop     :    the number of rows that will be left empty at
  11305.                                  the top of the window where the spreadsheet
  11306.                                  will be displayed
  11307.  
  11308.         AEmptyRowsAtBottom  :    the number of rows that will be left empty at
  11309.                                  the bottom of the window where the spreadsheet
  11310.                                  will be displayed
  11311.  
  11312.         AHScrollBar    :    pointer to the horizontal limited scrolling scroll
  11313.                             bar that will be used by the spreadsheet (must be
  11314.                             non-nil)
  11315.  
  11316.         AVScrollBar    :    pointer to the vertical limited scrolling scroll bar
  11317.                             that will be used by the spreadsheet (must be non-
  11318.                             nil)
  11319.  
  11320.         AInitMaxCols   :    the (maximum) number of columns the spreadsheet will
  11321.                             have
  11322.  
  11323.         AInitMaxRows   :    the (maximum) number of rows the spreadsheet will
  11324.                             have
  11325.  
  11326.         InitDefaultColWidth :    the default width of the columns in the
  11327.                                  spreadsheet
  11328.  
  11329.         InitDefaultDecimalPlaces :    the default number of decimal places
  11330.                                       numbers should be displayed with
  11331.         InitMaxDecimalPlaces     :    the maximum number of decimal places a
  11332.                                       number can be displayed with
  11333.  
  11334.         InitDefaultCurrency :    the default currency string that should be used
  11335.                                  when formatting numbers
  11336.  
  11337.    ************************************************************************
  11338.    TSpreadSheet.InitCurrPos procedure
  11339.    ************************************************************************
  11340.    DECLARATION:
  11341.  
  11342.         procedure InitCurrPos; virtual;
  11343.  
  11344.    UNIT:
  11345.  
  11346.         GLTSHEET.PAS
  11347.  
  11348.  
  11349.                                         156
  11350.  
  11351.  
  11352.  
  11353.  
  11354.  
  11355.  
  11356.  
  11357.  
  11358.    DESCRIPTION:
  11359.  
  11360.         Sets the position of the cursor to the first position in the spreadsheet
  11361.         (column 1 : row 1).
  11362.  
  11363.    ************************************************************************
  11364.    TSpreadSheet.InsertColumns procedure
  11365.    ************************************************************************
  11366.    DECLARATION:
  11367.  
  11368.         procedure InsertColumns; virtual;
  11369.  
  11370.    UNIT:
  11371.  
  11372.         GLTSHEET.PAS
  11373.  
  11374.    DESCRIPTION:
  11375.  
  11376.         Inserts one or more columns in the spreadsheet.
  11377.  
  11378.    REMARKS:
  11379.  
  11380.         (see TSpreadSheet.InsertColToHash)
  11381.  
  11382.  
  11383.    ************************************************************************
  11384.    TSpreadSheet.InsertRows procedure
  11385.    ************************************************************************
  11386.    DECLARATION:
  11387.  
  11388.         procedure InsertRows; virtual;
  11389.  
  11390.    UNIT:
  11391.  
  11392.         GLTSHEET.PAS
  11393.  
  11394.    DESCRIPTION:
  11395.  
  11396.         Inserts one or more rows in the spreadsheet.
  11397.  
  11398.    REMARKS:
  11399.  
  11400.         (see TSpreadSheet.InsertRowToHash)
  11401.  
  11402.  
  11403.    ************************************************************************
  11404.    TSpreadSheet.InsertRowToHash procedure
  11405.    ************************************************************************
  11406.    DECLARATION:
  11407.  
  11408.         procedure InsertRowToHash(Block: TBlock; Rows, StartInsRow:
  11409.           Word; var Deleted: Boolean); virtual;
  11410.  
  11411.    UNIT:
  11412.  
  11413.         GLTSHEET.PAS
  11414.  
  11415.  
  11416.  
  11417.                                         157
  11418.  
  11419.  
  11420.  
  11421.  
  11422.  
  11423.  
  11424.  
  11425.  
  11426.    DESCRIPTION:
  11427.  
  11428.         Insert a row or block of rows in the spreadsheet's hash tables.
  11429.  
  11430.    PARAMETERS' DESCRIPTION:
  11431.  
  11432.         Block     :    the block of cells that will be deleted (if any);  this
  11433.                        block will always be the block of cells that are located
  11434.                        in the last rows of the spreadsheet and that get pushed
  11435.                        out when one or more rows are inserted.
  11436.  
  11437.         Rows :    the number of rows that will be inserted
  11438.  
  11439.         StartInsRow    :    the row number where the new rows will be inserted
  11440.  
  11441.         Deleted   :    after a call to this procedure, this parameter will
  11442.                        contain a boolean value indicating if any cells were
  11443.                        deleted from the spreadsheet.
  11444.  
  11445.    REMARKS:
  11446.  
  11447.         (see TSpreadSheet.InsertRows)
  11448.  
  11449.  
  11450.    ************************************************************************
  11451.    TSpreadSheet.KeyPressed field
  11452.    ************************************************************************
  11453.    DECLARATION:
  11454.  
  11455.         KeyPressed : Boolean;
  11456.  
  11457.    UNIT:
  11458.  
  11459.         GLTSHEET.PAS
  11460.  
  11461.    DESCRIPTION:
  11462.  
  11463.         Indicates if a key was pressed.
  11464.  
  11465.    REMARKS:
  11466.  
  11467.         This field is used by TSpreadSheet's ScrollDraw method to determine when
  11468.         the mouse caused the scrollbar to change and when the movement of the
  11469.         cursor (using the cursor keys) caused the scrollbar to change.
  11470.  
  11471.  
  11472.    ************************************************************************
  11473.    TSpreadSheet.LastPos field
  11474.    ************************************************************************
  11475.    DECLARATION:
  11476.  
  11477.         LastPos : CellPos;
  11478.  
  11479.    UNIT:
  11480.  
  11481.         GLTSHEET.PAS
  11482.  
  11483.  
  11484.  
  11485.                                         158
  11486.  
  11487.  
  11488.  
  11489.  
  11490.  
  11491.  
  11492.  
  11493.  
  11494.    DESCRIPTION:
  11495.  
  11496.         The lower right corner of the block of cells actually used in the
  11497.         spreadsheet.
  11498.  
  11499.    ************************************************************************
  11500.    TSpreadSheet.Load CONSTRUCTOR
  11501.    ************************************************************************
  11502.    DECLARATION:
  11503.  
  11504.         constructor Load(var S: TStream);
  11505.  
  11506.    UNIT:
  11507.  
  11508.         GLTSHEET.PAS
  11509.  
  11510.    DESCRIPTION:
  11511.  
  11512.         Loads the spreadsheet from disk.
  11513.  
  11514.    PARAMETERS' DESCRIPTION:
  11515.  
  11516.         S    :    the stream from which the spreadsheet will be loaded
  11517.  
  11518.    ************************************************************************
  11519.    TSpreadSheet.LoadDelimited procedure
  11520.    ************************************************************************
  11521.    DECLARATION:
  11522.  
  11523.         procedure LoadDelimited(FileName: PathStr); virtual;
  11524.  
  11525.    UNIT:
  11526.  
  11527.         GLTSHEET.PAS
  11528.  
  11529.    DESCRIPTION:
  11530.  
  11531.         This method imports a comma delimited file of a certain format and is
  11532.         intended only as an example of how to import comma delimited files. 
  11533.         This method must be overridden if you wish to import delimited files of
  11534.         different formats.
  11535.  
  11536.    PARAMETERS' DESCRIPTION:
  11537.  
  11538.         FileName  :    the filename of the comma delimited file that will be
  11539.                        imported.
  11540.  
  11541.    ************************************************************************
  11542.    TSpreadSheet.LoadHashTables procedure
  11543.    ************************************************************************
  11544.    DECLARATION:
  11545.  
  11546.         procedure LoadHashTables(var S: TStream; AdjustAfter: CellPos;
  11547.           RowAdjustment, ColAdjustment: Integer); virtual;
  11548.  
  11549.    UNIT:
  11550.  
  11551.         GLTSHEET.PAS
  11552.  
  11553.                                         159
  11554.  
  11555.  
  11556.  
  11557.  
  11558.  
  11559.  
  11560.  
  11561.  
  11562.    DESCRIPTION:
  11563.  
  11564.         Loads the spreadsheet's hash tables from a stream.
  11565.  
  11566.    PARAMETERS' DESCRIPTION:
  11567.  
  11568.         S    :    the stream from which the hash tables will be loaded
  11569.  
  11570.         AdjustAfter    :    The location of all cells in the cell hash table
  11571.                             being loaded, below and to the left of this
  11572.                             position, will be increased by RowAdjustment and
  11573.                             ColAdjustment respectively.
  11574.  
  11575.         RowAdjustment  :    the row location of all cells below AdjustAfter will
  11576.                             be increased by this amount.
  11577.  
  11578.         ColAdjustment  :    the column location of all cells to the left of
  11579.                             AdjustAfter will be increased by this amount.
  11580.  
  11581.    REMARKS:
  11582.  
  11583.         The AdjustAfter, RowAdjustment and ColAdjustment parameters are used to
  11584.         relocate the cells in the cell hash table, when adding or deleting rows
  11585.         or columns.
  11586.  
  11587.         (see TSpreadSheet.StoreTablesToTempFile, TSpreadSheet.InsertColumns,
  11588.         TSpreadSheet.InsertRows, TSpreadSheet.DeleteColumns,
  11589.         TSpreadSheet.DeleteRows)
  11590.  
  11591.  
  11592.    ************************************************************************
  11593.    TSpreadSheet.LoadTablesFromTempFile procedure
  11594.    ************************************************************************
  11595.    DECLARATION:
  11596.  
  11597.         procedure LoadTablesFromTempFile(AdjustAfter: CellPos; 
  11598.           RowAdjustment, ColAdjustment: Integer); virtual;
  11599.  
  11600.    UNIT:
  11601.  
  11602.         GLTSHEET.PAS
  11603.  
  11604.    DESCRIPTION:
  11605.  
  11606.         Loads the spreadsheet's hash tables from the temporary file.
  11607.  
  11608.    PARAMETERS' DESCRIPTION:
  11609.  
  11610.         AdjustAfter    :    The location of all cells in the cell hash table
  11611.                             being loaded, below and to the left of this
  11612.                             position, will be increased by RowAdjustment and
  11613.                             ColAdjustment respectively.
  11614.  
  11615.         RowAdjustment  :    the row location of all cells below AdjustAfter will
  11616.                             be increased by this amount.
  11617.  
  11618.         ColAdjustment  :    the column location of all cells to the left of
  11619.                             AdjustAfter will be increased by this amount
  11620.  
  11621.                                            160
  11622.  
  11623.  
  11624.  
  11625.  
  11626.  
  11627.  
  11628.  
  11629.  
  11630.    REMARKS:
  11631.  
  11632.         The AdjustAfter, RowAdjustment and ColAdjustment parameters are used to
  11633.         relocate the cells in the cell hash table, when adding or deleting rows
  11634.         or columns.
  11635.  
  11636.         (see TSpreadSheet.InsertColumns, TSpreadSheet.InsertRows,
  11637.         TSpreadSheet.DeleteColumns, TSpreadSheet.DeleteRows)
  11638.  
  11639.  
  11640.    ************************************************************************
  11641.    TSpreadSheet.LocateCursorWithMouse procedure
  11642.    ************************************************************************
  11643.    DECLARATION:
  11644.  
  11645.         procedure LocateCursorWithMouse(Event: TEvent); virtual;
  11646.  
  11647.    UNIT:
  11648.  
  11649.         GLTSHEET.PAS
  11650.  
  11651.    DESCRIPTION:
  11652.  
  11653.         Locates the cursor wherever the mouse was clicked -- if inside the
  11654.         display area --.
  11655.  
  11656.    PARAMETERS' DESCRIPTION:
  11657.  
  11658.         Event     :    the event triggered by the mouse click
  11659.  
  11660.    REMARKS:
  11661.  
  11662.         (see TSpreadSheet.DragCursorWithMouse) 
  11663.  
  11664.  
  11665.    ************************************************************************
  11666.    TSpreadSheet.MaxCols field
  11667.    ************************************************************************
  11668.    DECLARATION:
  11669.  
  11670.         MaxCols : Integer;
  11671.  
  11672.    UNIT:
  11673.  
  11674.         GLTSHEET.PAS
  11675.  
  11676.    DESCRIPTION:
  11677.  
  11678.         (Maximum) Number of rows the spreadsheet will have.
  11679.  
  11680.    ************************************************************************
  11681.    TSpreadSheet.MaxColWidth field
  11682.    ************************************************************************
  11683.    DECLARATION:
  11684.  
  11685.         MaxColWidth : Byte;
  11686.  
  11687.  
  11688.  
  11689.                                         161
  11690.  
  11691.  
  11692.  
  11693.  
  11694.  
  11695.  
  11696.  
  11697.  
  11698.    UNIT:
  11699.  
  11700.         GLTSHEET.PAS
  11701.  
  11702.    DESCRIPTION:
  11703.  
  11704.         The maximum width a column can have.
  11705.  
  11706.    REMARKS:
  11707.  
  11708.         This is by default the maximum number of columns that can be used to
  11709.         display the data in the spreadsheet.
  11710.  
  11711.  
  11712.    ************************************************************************
  11713.    TSpreadSheet.MaxDecimalPlaces field
  11714.    ************************************************************************
  11715.    DECLARATION:
  11716.  
  11717.         MaxDecimalPlaces : Byte;
  11718.  
  11719.    UNIT:
  11720.  
  11721.         GLTSHEET.PAS
  11722.  
  11723.    DESCRIPTION:
  11724.  
  11725.         The maximum number of decimal places a number can be displayed with.
  11726.  
  11727.    ************************************************************************
  11728.    TSpreadSheet.MaxRows field
  11729.    ************************************************************************
  11730.    DECLARATION:
  11731.  
  11732.         MaxRows : Integer;
  11733.  
  11734.    UNIT:
  11735.  
  11736.         GLTSHEET.PAS
  11737.  
  11738.    DESCRIPTION:
  11739.  
  11740.         (Maximum) Number of columns the spreadsheet will have.
  11741.  
  11742.    ************************************************************************
  11743.    TSpreadSheet.MaxScreenCols field
  11744.    ************************************************************************
  11745.    DECLARATION:
  11746.  
  11747.         MaxScreenCols : Byte;
  11748.  
  11749.    UNIT:
  11750.  
  11751.         GLTSHEET.PAS
  11752.  
  11753.    DESCRIPTION:
  11754.  
  11755.         The maximum number of spreadsheet columns that can be displayed in a
  11756.  
  11757.                                            162
  11758.  
  11759.  
  11760.  
  11761.  
  11762.  
  11763.  
  11764.  
  11765.  
  11766.         window.
  11767.  
  11768.    ************************************************************************
  11769.    TSpreadSheet.Modified field
  11770.    ************************************************************************
  11771.    DECLARATION:
  11772.  
  11773.         Modified : Boolean;
  11774.  
  11775.    UNIT:
  11776.  
  11777.         GLTSHEET.PAS
  11778.  
  11779.    DESCRIPTION:
  11780.  
  11781.         Indicates if the spreadsheet has been modified and the modifications
  11782.         have not been saved to disk.
  11783.  
  11784.    REMARKS:
  11785.  
  11786.         (see TSpreadSheet.SetChanged)
  11787.  
  11788.  
  11789.    ************************************************************************
  11790.    TSpreadSheet.MoveCell procedure
  11791.    ************************************************************************
  11792.    DECLARATION:
  11793.  
  11794.         procedure MoveCell(OldPos: CellPos); virtual;
  11795.  
  11796.    UNIT:
  11797.  
  11798.         GLTSHEET.PAS
  11799.  
  11800.    DESCRIPTION:
  11801.  
  11802.         Redisplays the cursor in its new position (stored in the CurrPos field)
  11803.         in the spreadsheet, and if in block mode, extends the block of selected
  11804.         cells to that position.
  11805.  
  11806.    PARAMETERS' DESCRIPTION:
  11807.  
  11808.         OldPos    :    the previous position of the cursor
  11809.  
  11810.    ************************************************************************
  11811.    TSpreadSheet.MoveCellBlock procedure
  11812.    ************************************************************************
  11813.    DECLARATION:
  11814.  
  11815.         procedure MoveCellBlock; virtual;
  11816.  
  11817.    UNIT:
  11818.  
  11819.         GLTSHEET.PAS
  11820.  
  11821.    DESCRIPTION:
  11822.  
  11823.         Activates the clipboard and sets it to indicate a move operation and the
  11824.  
  11825.                                            163
  11826.  
  11827.  
  11828.  
  11829.  
  11830.  
  11831.  
  11832.  
  11833.  
  11834.         block to be moved.
  11835.  
  11836.    REMARKS:
  11837.  
  11838.         The block is not actually moved; the block will be moved when
  11839.         TSpreadSheet's PasteCellBlock method is called.
  11840.  
  11841.  
  11842.    ************************************************************************
  11843.    TSpreadSheet.MoveDown procedure
  11844.    ************************************************************************
  11845.    DECLARATION:
  11846.  
  11847.         procedure MoveDown; virtual;
  11848.  
  11849.    UNIT:
  11850.  
  11851.         GLTSHEET.PAS
  11852.  
  11853.    DESCRIPTION:
  11854.  
  11855.         Moves the cursor one position down.
  11856.  
  11857.    ************************************************************************
  11858.    TSpreadSheet.MoveHome procedure
  11859.    ************************************************************************
  11860.    DECLARATION:
  11861.  
  11862.         procedure MoveHome; virtual;
  11863.  
  11864.    UNIT:
  11865.  
  11866.         GLTSHEET.PAS
  11867.  
  11868.    DESCRIPTION:
  11869.  
  11870.         Moves the cursor to the first position in the spreadsheet (column 1 :
  11871.         row 1).
  11872.  
  11873.    ************************************************************************
  11874.    TSpreadSheet.MoveLeft procedure
  11875.    ************************************************************************
  11876.    DECLARATION:
  11877.  
  11878.         procedure MoveLeft; virtual;
  11879.  
  11880.    UNIT:
  11881.  
  11882.         GLTSHEET.PAS
  11883.  
  11884.    DESCRIPTION:
  11885.  
  11886.         Moves the cursor one position to the left.
  11887.  
  11888.  
  11889.  
  11890.  
  11891.  
  11892.  
  11893.                                         164
  11894.  
  11895.  
  11896.  
  11897.  
  11898.  
  11899.  
  11900.  
  11901.  
  11902.    ************************************************************************
  11903.    TSpreadSheet.MovePgDown procedure
  11904.    ************************************************************************
  11905.    DECLARATION:
  11906.  
  11907.         procedure MovePgDown; virtual;
  11908.  
  11909.    UNIT:
  11910.  
  11911.         GLTSHEET.PAS
  11912.  
  11913.    DESCRIPTION:
  11914.  
  11915.         Moves the cursor one page down.
  11916.  
  11917.    ************************************************************************
  11918.    TSpreadSheet.MovePgLeft procedure
  11919.    ************************************************************************
  11920.    DECLARATION:
  11921.  
  11922.         procedure MovePgLeft; virtual;
  11923.  
  11924.    UNIT:
  11925.  
  11926.         GLTSHEET.PAS
  11927.  
  11928.    DESCRIPTION:
  11929.  
  11930.         Moves the cursor one page to the left.
  11931.  
  11932.    ************************************************************************
  11933.    TSpreadSheet.MovePgRight procedure
  11934.    ************************************************************************
  11935.    DECLARATION:
  11936.  
  11937.         procedure MovePgRight; virtual;
  11938.  
  11939.    UNIT:
  11940.  
  11941.         GLTSHEET.PAS
  11942.  
  11943.    DESCRIPTION:
  11944.  
  11945.         Moves the cursor one page to the right.
  11946.  
  11947.    ************************************************************************
  11948.    TSpreadSheet.MovePgUp procedure
  11949.    ************************************************************************
  11950.    DECLARATION:
  11951.  
  11952.         procedure MovePgUp; virtual;
  11953.  
  11954.    UNIT:
  11955.  
  11956.         GLTSHEET.PAS
  11957.  
  11958.  
  11959.  
  11960.  
  11961.                                         165
  11962.  
  11963.  
  11964.  
  11965.  
  11966.  
  11967.  
  11968.  
  11969.  
  11970.    DESCRIPTION:
  11971.  
  11972.         Moves the cursor one page up.
  11973.  
  11974.    ************************************************************************
  11975.    TSpreadSheet.MoveRight procedure
  11976.    ************************************************************************
  11977.    DECLARATION:
  11978.  
  11979.         procedure MoveRight; virtual;
  11980.  
  11981.    UNIT:
  11982.  
  11983.         GLTSHEET.PAS
  11984.  
  11985.    DESCRIPTION:
  11986.  
  11987.         Move the cursor one position to the right.
  11988.  
  11989.    ************************************************************************
  11990.    TSpreadSheet.MoveUp procedure
  11991.    ************************************************************************
  11992.    DECLARATION:
  11993.  
  11994.         procedure MoveUp; virtual;
  11995.  
  11996.    UNIT:
  11997.  
  11998.         GLTSHEET.PAS
  11999.  
  12000.    DESCRIPTION:
  12001.  
  12002.         Moves the cursor one position up.
  12003.  
  12004.    ************************************************************************
  12005.    TSpreadSheet.NoBlankArea field
  12006.    ************************************************************************
  12007.    DECLARATION:
  12008.  
  12009.         NoBlankArea : Boolean;
  12010.  
  12011.    UNIT:
  12012.  
  12013.         GLTSHEET.PAS
  12014.  
  12015.    DESCRIPTION:
  12016.  
  12017.         Indicates if there is an empty area in the window.
  12018.  
  12019.    REMARKS:
  12020.  
  12021.         (see TSpreadSheet.BlankArea)
  12022.  
  12023.  
  12024.  
  12025.  
  12026.  
  12027.  
  12028.  
  12029.                                         166
  12030.  
  12031.  
  12032.  
  12033.  
  12034.  
  12035.  
  12036.  
  12037.  
  12038.    ************************************************************************
  12039.    TSpreadSheet.Number field
  12040.    ************************************************************************
  12041.    DECLARATION:
  12042.  
  12043.         Number : Byte;
  12044.  
  12045.    UNIT:
  12046.  
  12047.         GLTSHEET.PAS
  12048.  
  12049.    DESCRIPTION:
  12050.  
  12051.         The number assigned to the spreadsheet.
  12052.  
  12053.    REMARKS:
  12054.  
  12055.         This number is displayed as a letter in the info area.
  12056.  
  12057.         (see TSpreadSheet.SetNumber)
  12058.  
  12059.  
  12060.    ************************************************************************
  12061.    TSpreadSheet.OldCurrPos field
  12062.    ************************************************************************
  12063.    DECLARATION:
  12064.  
  12065.         OldCurrPos : CellPos;
  12066.  
  12067.    UNIT:
  12068.  
  12069.         GLTSHEET.PAS
  12070.  
  12071.    DESCRIPTION:
  12072.  
  12073.         Used to temporarily store the position of the cursor when the
  12074.         spreadsheet is not active.  When the spreadsheet is activated again, the
  12075.         cursor is set to the position stored in this field.
  12076.  
  12077.    REMARKS:
  12078.  
  12079.         (see TSpreadSheet.SetState)
  12080.  
  12081.  
  12082.    ************************************************************************
  12083.    TSpreadSheet.OverwriteHash field
  12084.    ************************************************************************
  12085.    DECLARATION:
  12086.  
  12087.         OverwriteHash : TOverwriteHashTable;
  12088.  
  12089.    UNIT:
  12090.  
  12091.         GLTSHEET.PAS
  12092.  
  12093.    DESCRIPTION:
  12094.  
  12095.         Overwrite hash table that will be used to store overwrite information
  12096.  
  12097.                                            167
  12098.  
  12099.  
  12100.  
  12101.  
  12102.  
  12103.  
  12104.  
  12105.  
  12106.         for the cells in the spreadsheet.
  12107.  
  12108.    ************************************************************************
  12109.    TSpreadSheet.OverwriteHashStart function
  12110.    ************************************************************************
  12111.    DECLARATION:
  12112.  
  12113.         function  OverwriteHashStart: BucketRange; virtual;
  12114.  
  12115.    UNIT:
  12116.  
  12117.         GLTSHEET.PAS
  12118.  
  12119.    DESCRIPTION:
  12120.  
  12121.         Returns the number of buckets the overwrite hash table will have.
  12122.  
  12123.    ************************************************************************
  12124.    TSpreadSheet.Parser function
  12125.    ************************************************************************
  12126.    DECLARATION:
  12127.  
  12128.         function  Parser: PParserObject; virtual;
  12129.  
  12130.    UNIT:
  12131.  
  12132.         GLTSHEET.PAS
  12133.  
  12134.    DESCRIPTION:
  12135.  
  12136.         Returns a pointer to the parser object that will be used by the
  12137.         spreadsheet.
  12138.  
  12139.    REMARKS:
  12140.  
  12141.         (see StandardParser in GLPARSER.INT, StandardSortObject,
  12142.         TSpreadSheet.SortObject)
  12143.  
  12144.  
  12145.    ************************************************************************
  12146.    TSpreadSheet.PasteBlock procedure
  12147.    ************************************************************************
  12148.    DECLARATION:
  12149.  
  12150.         procedure PasteBlock(DestBlock: TBlock; Formulas: Word);
  12151.           virtual;
  12152.  
  12153.    UNIT:
  12154.  
  12155.         GLTSHEET.PAS
  12156.  
  12157.    DESCRIPTION:
  12158.  
  12159.         Copies or moves a block of cells in a cell hash table to a new position.
  12160.  
  12161.    PARAMETERS' DESCRIPTION:
  12162.  
  12163.         DestBlock :    the block where the cells will be copied or moved.
  12164.  
  12165.                                            168
  12166.  
  12167.  
  12168.  
  12169.  
  12170.  
  12171.  
  12172.  
  12173.  
  12174.         Formulas  :    bit flags indicating if formulas should be copied
  12175.                        literally when moved or copied to another position (see
  12176.                        RCopyFormulas).
  12177.  
  12178.                        $01 = copy column references literally
  12179.                        $02 = copy row references literally
  12180.  
  12181.    REMARKS:
  12182.  
  12183.         (see TSpreadSheet.PasteCellBlock)
  12184.  
  12185.  
  12186.    ************************************************************************
  12187.    TSpreadSheet.PasteCellBlock procedure
  12188.    ************************************************************************
  12189.    DECLARATION:
  12190.  
  12191.         procedure PasteCellBlock; virtual;
  12192.  
  12193.    UNIT:
  12194.  
  12195.         GLTSHEET.PAS
  12196.  
  12197.    DESCRIPTION:
  12198.  
  12199.         If the clipboard is active, this method determines the destination block
  12200.         of the cells that will be copied or moved and verifies that no attempt
  12201.         is being made to change a protected cell before copying or moving the
  12202.         source block of cells to its new position.
  12203.  
  12204.    REMARKS:
  12205.  
  12206.         (see TSpreadSheet.PasteBlock, ClipBoardRec)
  12207.  
  12208.  
  12209.    ************************************************************************
  12210.    TSpreadSheet.Print procedure
  12211.    ************************************************************************
  12212.    DECLARATION:
  12213.  
  12214.         procedure Print; virtual;
  12215.  
  12216.    UNIT:
  12217.  
  12218.         GLTSHEET.PAS
  12219.  
  12220.    DESCRIPTION:
  12221.  
  12222.         Prompts the user for the desired printer configuration and the prints
  12223.         the file to the selected output device.
  12224.  
  12225.    ************************************************************************
  12226.    TSpreadSheet.Recalc procedure
  12227.    ************************************************************************
  12228.    DECLARATION:
  12229.  
  12230.         procedure Recalc(Display: Boolean); virtual;
  12231.  
  12232.  
  12233.                                         169
  12234.  
  12235.  
  12236.  
  12237.  
  12238.  
  12239.  
  12240.  
  12241.  
  12242.    UNIT:
  12243.  
  12244.         GLTSHEET.PAS
  12245.  
  12246.    DESCRIPTION:
  12247.  
  12248.         Recalculates the value of each cells in the spreadsheet.
  12249.  
  12250.    REMARKS:
  12251.  
  12252.         This is a very simple method to recalculate the value the cells in the
  12253.         spreadsheet;  it could happen that a cell might not get correctly
  12254.         recalculated because of information that is not updated on time.
  12255.  
  12256.  
  12257.    ************************************************************************
  12258.    TSpreadSheet.RowArea field
  12259.    ************************************************************************
  12260.    DECLARATION:
  12261.  
  12262.         RowArea : TScreenArea;
  12263.  
  12264.    UNIT:
  12265.  
  12266.         GLTSHEET.PAS
  12267.  
  12268.    DESCRIPTION:
  12269.  
  12270.         Area of the window where row numbers will be displayed.
  12271.  
  12272.    REMARKS:
  12273.  
  12274.         (see TSpreadSheet.DisplayRows)
  12275.  
  12276.  
  12277.    ************************************************************************
  12278.    TSpreadSheet.RowNumberSpace field
  12279.    ************************************************************************
  12280.    DECLARATION:
  12281.  
  12282.         RowNumberSpace : Byte;
  12283.  
  12284.    UNIT:
  12285.  
  12286.         GLTSHEET.PAS
  12287.  
  12288.    DESCRIPTION:
  12289.  
  12290.         The number of screen columns that are used to display the row numbers.
  12291.  
  12292.    REMARKS:
  12293.  
  12294.         At first, this field depended on the number of rows that the spreadsheet
  12295.         had.  However, since the info area (just above the row numbers) must
  12296.         have a constant size, this field was assigned a constant size of 6.
  12297.  
  12298.  
  12299.  
  12300.  
  12301.                                         170
  12302.  
  12303.  
  12304.  
  12305.  
  12306.  
  12307.  
  12308.  
  12309.  
  12310.    ************************************************************************
  12311.    TSpreadSheet.RowToY function
  12312.    ************************************************************************
  12313.    DECLARATION:
  12314.  
  12315.         function  RowToY(Row: Integer): Byte; virtual;
  12316.  
  12317.    UNIT:
  12318.  
  12319.         GLTSHEET.PAS
  12320.  
  12321.    DESCRIPTION:
  12322.  
  12323.         Returns the location in the screen of a given column.
  12324.  
  12325.    PARAMETERS' DESCRIPTION:
  12326.  
  12327.         Row  :    the row whose location in the screen will be determined
  12328.  
  12329.    ************************************************************************
  12330.    TSpreadSheet.SameCellPos function
  12331.    ************************************************************************
  12332.    DECLARATION:
  12333.  
  12334.         function  SameCellPos(P1, P2 : CellPos) : Boolean; virtual;
  12335.  
  12336.    UNIT:
  12337.  
  12338.         GLTSHEET.PAS
  12339.  
  12340.    DESCRIPTION:
  12341.  
  12342.         Returns TRUE if two given cell positions are the same.
  12343.         P1   :    a cell position to be compared
  12344.  
  12345.         P2   :    a cell position to be compared
  12346.  
  12347.  
  12348.    ************************************************************************
  12349.    TSpreadSheet.ScrollDraw procedure
  12350.    ************************************************************************
  12351.    DECLARATION:
  12352.  
  12353.         procedure ScrollDraw; virtual;
  12354.  
  12355.    UNIT:
  12356.  
  12357.         GLTSHEET.PAS
  12358.  
  12359.    DESCRIPTION:
  12360.  
  12361.         Redraws the spreadsheet whenever the scroll bars change.
  12362.  
  12363.  
  12364.  
  12365.  
  12366.  
  12367.  
  12368.  
  12369.                                         171
  12370.  
  12371.  
  12372.  
  12373.  
  12374.  
  12375.  
  12376.  
  12377.  
  12378.    ************************************************************************
  12379.    TSpreadSheet.SelectColumn function
  12380.    ************************************************************************
  12381.    DECLARATION:
  12382.  
  12383.         function  SelectColumn(var Event: TEvent): Boolean; virtual;
  12384.  
  12385.    UNIT:
  12386.  
  12387.         GLTSHEET.PAS
  12388.  
  12389.    DESCRIPTION:
  12390.  
  12391.         Checks if the mouse was clicked in the headers area, determines the
  12392.         column whose header was clicked and then selects the column.
  12393.  
  12394.    PARAMETERS' DESCRIPTION:
  12395.  
  12396.         Event     :    the event being evaluated and, if possible, handled by
  12397.                        this method
  12398.  
  12399.    ************************************************************************
  12400.    TSpreadSheet.SetAreas procedure
  12401.    ************************************************************************
  12402.    DECLARATION:
  12403.  
  12404.         procedure SetAreas(ScrollArea: TRect); virtual;
  12405.  
  12406.    UNIT:
  12407.  
  12408.         GLTSHEET.PAS
  12409.  
  12410.    DESCRIPTION:
  12411.  
  12412.         Sets the different display areas (info, column headers, row numbers,
  12413.         cell data, cell contents, display and blank areas) of the spreadsheet.
  12414.  
  12415.    PARAMETERS' DESCRIPTION:
  12416.  
  12417.         ScrollArea     :    the area of the window where the spreadsheet will be
  12418.                             displayed
  12419.  
  12420.    REMARKS:
  12421.  
  12422.         (see TSpreadSheet.InfoArea, TSpreadSheetadsSheet.ColArea,
  12423.         TSpreadSheet.RowArea, TSpreadSheet.DataArea, TSpreadSheet.ContenstArea,
  12424.         TSpreadSheet.DisplayArea, TSpreadSheet.BlankArea)
  12425.  
  12426.  
  12427.    ************************************************************************
  12428.    TSpreadSheet.SetBlankArea procedure
  12429.    ************************************************************************
  12430.    DECLARATION:
  12431.  
  12432.         procedure SetBlankArea; virtual;
  12433.  
  12434.  
  12435.  
  12436.  
  12437.                                         172
  12438.  
  12439.  
  12440.  
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.    UNIT:
  12447.  
  12448.         GLTSHEET.PAS
  12449.  
  12450.    DESCRIPTION:
  12451.  
  12452.         Sets the area the will be left empty in the spreadsheet.
  12453.  
  12454.    REMARKS:
  12455.  
  12456.         If there is no blank area, this method sets the NoBlankArea field to
  12457.         TRUE; otherwise, it is set to FALSE.
  12458.  
  12459.         (see TSpreadSheet.NoBlankArea)
  12460.  
  12461.  
  12462.    ************************************************************************
  12463.    TSpreadSheet.SetChanged procedure
  12464.    ************************************************************************
  12465.    DECLARATION:
  12466.  
  12467.         procedure SetChanged(IsChanged: Boolean); virtual;
  12468.  
  12469.    UNIT:
  12470.  
  12471.         GLTSHEET.PAS
  12472.  
  12473.    DESCRIPTION:
  12474.  
  12475.         Sets the modified state of the spreadsheet.
  12476.  
  12477.    PARAMETERS' DESCRIPTION:
  12478.  
  12479.         IsChanged :    the modified state of the spreadsheet.  TRUE indicates
  12480.                        that the spreadsheet has been modified since the last
  12481.                        save; FALSE indicates that the spreadsheet has not been
  12482.                        modified since the last save.
  12483.  
  12484.    REMARKS:
  12485.  
  12486.         (see TSpreadSheet.Modified)
  12487.  
  12488.  
  12489.    ************************************************************************
  12490.    TSpreadSheet.SetLimit procedure
  12491.    ************************************************************************
  12492.    DECLARATION:
  12493.  
  12494.         procedure SetLimit(X, Y: Integer); virtual;
  12495.  
  12496.    UNIT:
  12497.  
  12498.         GLTSHEET.PAS
  12499.  
  12500.    DESCRIPTION:
  12501.  
  12502.         Sets the scrolling limits of the spreadsheet and ajusts the scrollbars
  12503.         accordingly.
  12504.  
  12505.                                            173
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.    PARAMETERS' DESCRIPTION:
  12515.  
  12516.         X    :    the spreadsheet's horizontal scrolling limit
  12517.  
  12518.         Y    :    the spreadsheet's vertical scrolling limit
  12519.  
  12520.    ************************************************************************
  12521.    TSpreadSheet.SetLocked procedure
  12522.    ************************************************************************
  12523.    DECLARATION:
  12524.  
  12525.         procedure SetLocked; virtual;
  12526.  
  12527.    UNIT:
  12528.  
  12529.         GLTSHEET.PAS
  12530.  
  12531.    DESCRIPTION:
  12532.  
  12533.         Restores a cell or block of cells to the locked stated (the default
  12534.         state), preventing modification of the cells when the spreadsheet is
  12535.         protected.
  12536.  
  12537.    ************************************************************************
  12538.    TSpreadSheet.SetNameWithMouse procedure
  12539.    ************************************************************************
  12540.    DECLARATION:
  12541.  
  12542.         procedure SetNameWithMouse(var Event: TEvent); virtual;
  12543.  
  12544.    UNIT:
  12545.  
  12546.         GLTSHEET.PAS
  12547.  
  12548.    DESCRIPTION:
  12549.  
  12550.         Checks if the mouse was double-clicked in a column header; if true, it
  12551.         prompts the user for a new column header.
  12552.  
  12553.    PARAMETERS' DESCRIPTION:
  12554.  
  12555.         Event     :    the event that was triggered by the mouse double-clicking
  12556.  
  12557.    ************************************************************************
  12558.    TSpreadSheet.SetNumber procedure
  12559.    ************************************************************************
  12560.    DECLARATION:
  12561.  
  12562.         procedure SetNumber(ANumber: Byte); virtual;
  12563.  
  12564.    UNIT:
  12565.  
  12566.         GLTSHEET.PAS
  12567.  
  12568.    DESCRIPTION:
  12569.  
  12570.         Assigns a number to the spreadsheet.
  12571.  
  12572.  
  12573.                                         174
  12574.  
  12575.  
  12576.  
  12577.  
  12578.  
  12579.  
  12580.  
  12581.  
  12582.    PARAMETERS' DESCRIPTION:
  12583.  
  12584.         ANumber   :    the number of the spreadsheet.
  12585.  
  12586.    REMARKS:
  12587.  
  12588.         (see TSpreadSheet.Number)
  12589.  
  12590.  
  12591.    ************************************************************************
  12592.    TSpreadSheet.SetProtection procedure
  12593.    ************************************************************************
  12594.    DECLARATION:
  12595.  
  12596.         procedure SetProtection(Enable, Display: Boolean); virtual;
  12597.  
  12598.    UNIT:
  12599.  
  12600.         GLTSHEET.PAS
  12601.  
  12602.    DESCRIPTION:
  12603.  
  12604.         Enables or disables the spreadsheet's data protection.
  12605.  
  12606.    PARAMETERS' DESCRIPTION:
  12607.  
  12608.         Enable    :    indicates if data protection should be enabled or
  12609.                        disabled
  12610.  
  12611.         Display   :    indicates if the spreadsheet should be redisplayed after
  12612.                        enabling or disabling data protection.
  12613.  
  12614.    ************************************************************************
  12615.    TSpreadSheet.SetScreenColStop procedure
  12616.    ************************************************************************
  12617.    DECLARATION:
  12618.  
  12619.         procedure SetScreenColStop(NewCol: Integer); virtual;
  12620.  
  12621.    UNIT:
  12622.  
  12623.         GLTSHEET.PAS
  12624.  
  12625.    DESCRIPTION:
  12626.  
  12627.         Sets a new screen block given an ending column.
  12628.  
  12629.    PARAMETERS' DESCRIPTION:
  12630.  
  12631.         NewCol    :    the ending column of the new screen block
  12632.  
  12633.    REMARKS:
  12634.  
  12635.         (see TSpreadSheet.ScreenBlock, TSpreadSheet.FindScreenColStart,
  12636.         TSpreadSheet.FindScreenColStop)
  12637.  
  12638.  
  12639.  
  12640.  
  12641.                                         175
  12642.  
  12643.  
  12644.  
  12645.  
  12646.  
  12647.  
  12648.  
  12649.  
  12650.    ************************************************************************
  12651.    TSpreadSheet.SetScreenColStart procedure
  12652.    ************************************************************************
  12653.    DECLARATION:
  12654.  
  12655.         procedure SetScreenColStart(NewCol: Integer); virtual;
  12656.  
  12657.    UNIT:
  12658.  
  12659.         GLTSHEET.PAS
  12660.  
  12661.    DESCRIPTION:
  12662.  
  12663.         Sets a new screen block given a starting column.
  12664.  
  12665.    PARAMETERS' DESCRIPTION:
  12666.  
  12667.         NewCol    :    the starting column of the new screen block
  12668.  
  12669.    REMARKS:
  12670.  
  12671.         (see TSpreadSheet.ScreenBlock, TSpreadSheet.FindScreenColStart,
  12672.         TSpreadSheet.FindScreenColStop)
  12673.  
  12674.  
  12675.    ************************************************************************
  12676.    TSpreadSheet.SetScreenRowStop procedure
  12677.    ************************************************************************
  12678.    DECLARATION:
  12679.  
  12680.         procedure SetScreenRowStop(NewRow: Integer); virtual;
  12681.  
  12682.    UNIT:
  12683.  
  12684.         GLTSHEET.PAS
  12685.  
  12686.    DESCRIPTION:
  12687.  
  12688.         Sets a new screen block given an ending row.
  12689.  
  12690.    PARAMETERS' DESCRIPTION:
  12691.  
  12692.         NewRow    :    the ending row of the new screen block
  12693.  
  12694.    REMARKS:
  12695.  
  12696.         (see TSpreadSheet.ScreenBlock, TSpreadSheet.FindScreenRowStart,
  12697.         TSpreadSheet.FindScreenRowStop)
  12698.  
  12699.  
  12700.    ************************************************************************
  12701.    TSpreadSheet.SetScreenRowStart procedure
  12702.    ************************************************************************
  12703.    DECLARATION:
  12704.  
  12705.         procedure SetScreenRowStart(NewRow: Integer); virtual;
  12706.  
  12707.  
  12708.  
  12709.                                         176
  12710.  
  12711.  
  12712.  
  12713.  
  12714.  
  12715.  
  12716.  
  12717.  
  12718.    UNIT:
  12719.  
  12720.         GLTSHEET.PAS
  12721.  
  12722.    DESCRIPTION:
  12723.  
  12724.         Sets a new screen block given a starting row.
  12725.  
  12726.    PARAMETERS' DESCRIPTION:
  12727.  
  12728.         NewRow    :    the starting row of the new screen block
  12729.  
  12730.    REMARKS:
  12731.  
  12732.         (see TSpreadSheet.ScreenBlock, TSpreadSheet.FindScreenRowStart,
  12733.         TSpreadSheet.FindScreenRowStop)
  12734.  
  12735.  
  12736.    ************************************************************************
  12737.    TSpreadSheet.SetState procedure
  12738.    ************************************************************************
  12739.    DECLARATION:
  12740.  
  12741.         procedure SetState(AState: Word; Enable: Boolean); virtual;
  12742.  
  12743.    UNIT:
  12744.  
  12745.         GLTSHEET.PAS
  12746.  
  12747.    DESCRIPTION:
  12748.  
  12749.         Changes the state flags of the spreadsheet and displays or hides the
  12750.         cursor depending on whether the spreadsheet is activated or deactivated.
  12751.  
  12752.    PARAMETERS' DESCRIPTION:
  12753.  
  12754.         AState    :    the state flags that will be enabled or disabled
  12755.  
  12756.         Enable    :    indicates if the given state flags should be enabled or
  12757.                        disabled
  12758.  
  12759.    ************************************************************************
  12760.    TSpreadSheet.SetUnlocked procedure
  12761.    ************************************************************************
  12762.    DECLARATION:
  12763.  
  12764.         procedure SetUnlocked; virtual;
  12765.  
  12766.    UNIT:
  12767.  
  12768.         GLTSHEET.PAS
  12769.  
  12770.    DESCRIPTION:
  12771.  
  12772.         Marks a cell or group of cells as unlocked, allowing the modification of
  12773.         the cells even when the spreadsheet is protected.
  12774.  
  12775.  
  12776.  
  12777.                                         177
  12778.  
  12779.  
  12780.  
  12781.  
  12782.  
  12783.  
  12784.  
  12785.  
  12786.    ************************************************************************
  12787.    TSpreadSheet.SheetProtected field
  12788.    ************************************************************************
  12789.    DECLARATION:
  12790.  
  12791.         SheetProtected : Boolean;
  12792.  
  12793.    UNIT:
  12794.  
  12795.         GLTSHEET.PAS
  12796.  
  12797.    DESCRIPTION:
  12798.  
  12799.         Indicates if the data in the spreadsheet is protected and cannot be
  12800.         modified (except for data in cells marked as unlocked).
  12801.  
  12802.    REMARKS:
  12803.  
  12804.         (see TSpreadSheet.SetProtection)
  12805.  
  12806.  
  12807.    ************************************************************************
  12808.    TSpreadSheet.SortData procedure
  12809.    ************************************************************************
  12810.    DECLARATION:
  12811.  
  12812.         procedure SortData; virtual;
  12813.  
  12814.    UNIT:
  12815.  
  12816.         GLTSHEET.PAS
  12817.  
  12818.    DESCRIPTION:
  12819.  
  12820.         Sorts the data by rows in the current block of selected cells, using up
  12821.         to three different sort keys.
  12822.  
  12823.    REMARKS:
  12824.  
  12825.         If block mode is off, all the data in the spreadsheet will be selected
  12826.         and sorted.
  12827.  
  12828.         (see TSortObject, TSpreadSheet.SortObject)
  12829.  
  12830.  
  12831.    ************************************************************************
  12832.    TSpreadSheet.SortObject function
  12833.    ************************************************************************
  12834.    DECLARATION:
  12835.  
  12836.         function  SortObject : PSortObject; virtual;
  12837.  
  12838.    UNIT:
  12839.  
  12840.         GLTSHEET.PAS
  12841.  
  12842.  
  12843.  
  12844.  
  12845.                                         178
  12846.  
  12847.  
  12848.  
  12849.  
  12850.  
  12851.  
  12852.  
  12853.  
  12854.    DESCRIPTION:
  12855.  
  12856.         Returns a pointer to the object that will be used to sort the data in
  12857.         the spreadsheet.
  12858.  
  12859.    REMARKS:
  12860.  
  12861.         (see StandardSortObject)
  12862.  
  12863.  
  12864.    ************************************************************************
  12865.    TSpreadSheet.Store procedure
  12866.    ************************************************************************
  12867.    DECLARATION:
  12868.  
  12869.         procedure Store(var S: TStream);
  12870.  
  12871.    UNIT:
  12872.  
  12873.         GLTSHEET.PAS
  12874.  
  12875.    DESCRIPTION:
  12876.  
  12877.         Writes the spreadsheet to a stream.
  12878.  
  12879.    PARAMETERS' DESCRIPTION:
  12880.  
  12881.         S    :    the stream to which the spreadsheet will be written
  12882.  
  12883.    ************************************************************************
  12884.    TSpreadSheet.StoreHashTables procedure
  12885.    ************************************************************************
  12886.    DECLARATION:
  12887.  
  12888.         procedure StoreHashTables(var S: TStream); virtual;
  12889.  
  12890.    UNIT:
  12891.  
  12892.         GLTSHEET.PAS
  12893.  
  12894.    DESCRIPTION:
  12895.  
  12896.         Writes the spreadsheet's hash tables to a stream.
  12897.  
  12898.    PARAMETERS' DESCRIPTION:
  12899.  
  12900.         S    :    the stream to which the hash tables will be written
  12901.  
  12902.    ************************************************************************
  12903.    TSpreadSheet.StoreTablesToTempFile procedure
  12904.    ************************************************************************
  12905.    DECLARATION:
  12906.  
  12907.         procedure StoreTablesToTempFile; virtual;
  12908.  
  12909.    UNIT:
  12910.  
  12911.         GLTSHEET.PAS
  12912.  
  12913.                                         179
  12914.  
  12915.  
  12916.  
  12917.  
  12918.  
  12919.  
  12920.  
  12921.  
  12922.    DESCRIPTION:
  12923.  
  12924.         Stores the spreadsheet's hash tables to a temporary file.
  12925.  
  12926.    REMARKS:
  12927.  
  12928.         (see TSpreadSheet.StoreTablesToTempFile)
  12929.  
  12930.  
  12931.    ************************************************************************
  12932.    TSpreadSheet.ToggleAutoCalc procedure
  12933.    ************************************************************************
  12934.    DECLARATION:
  12935.  
  12936.         procedure ToggleAutoCalc; virtual;
  12937.  
  12938.    UNIT:
  12939.  
  12940.         GLTSHEET.PAS
  12941.  
  12942.    DESCRIPTION:
  12943.  
  12944.         Toggles on and off the spreadsheet's auto calc mode.
  12945.  
  12946.    ************************************************************************
  12947.    TSpreadSheet.ToggleDisplayHeaders procedure
  12948.    ************************************************************************
  12949.    DECLARATION:
  12950.  
  12951.         procedure ToggleDisplayHeaders; virtual;
  12952.  
  12953.    UNIT:
  12954.  
  12955.         GLTSHEET.PAS
  12956.  
  12957.    DESCRIPTION:
  12958.  
  12959.         Toggles on and off the spreadsheet's Display Headers mode.
  12960.  
  12961.    ************************************************************************
  12962.    TSpreadSheet.ToggleEnd procedure
  12963.    ************************************************************************
  12964.    DECLARATION:
  12965.  
  12966.         procedure ToggleEnd; virtual;
  12967.  
  12968.    UNIT:
  12969.  
  12970.         GLTSHEET.PAS
  12971.  
  12972.    DESCRIPTION:
  12973.  
  12974.         When the END key is pressed, pressing a cursor key will move the cursor
  12975.         to the end of the spreadsheet in the direction of the cursor key.  This
  12976.         method will toggle the value of the GoToEnd field to TRUE and FALSE.
  12977.  
  12978.  
  12979.  
  12980.  
  12981.                                         180
  12982.  
  12983.  
  12984.  
  12985.  
  12986.  
  12987.  
  12988.  
  12989.  
  12990.    REMARKS:
  12991.  
  12992.         (see TSpreadSheet.GoToEnd)
  12993.  
  12994.  
  12995.    ************************************************************************
  12996.    TSpreadSheet.ToggleFormulaDisplay procedure
  12997.    ************************************************************************
  12998.    DECLARATION:
  12999.  
  13000.         procedure ToggleFormulaDisplay; virtual;
  13001.  
  13002.    UNIT:
  13003.  
  13004.         GLTSHEET.PAS
  13005.  
  13006.    DESCRIPTION:
  13007.  
  13008.         Toggles on and off the spreadsheet's Display Formulas mode.
  13009.  
  13010.    ************************************************************************
  13011.    TSpreadSheet.ToogleBlockOn procedure
  13012.    ************************************************************************
  13013.    DECLARATION:
  13014.  
  13015.         procedure ToggleBlockOn; virtual;
  13016.  
  13017.    UNIT:
  13018.  
  13019.         GLTSHEET.PAS
  13020.  
  13021.    DESCRIPTION:
  13022.  
  13023.         Toggles on and off the spreadsheet's block mode.
  13024.  
  13025.    ************************************************************************
  13026.    TSpreadSheet.TotalRows field
  13027.    ************************************************************************
  13028.    DECLARATION:
  13029.  
  13030.         TotalRows : ScreenRowRange;
  13031.  
  13032.    UNIT:
  13033.  
  13034.         GLTSHEET.PAS
  13035.  
  13036.    DESCRIPTION:
  13037.  
  13038.         The number of rows currently being displayed in the spreadsheet.
  13039.  
  13040.    ************************************************************************
  13041.    TSpreadSheet.TrackCursor function
  13042.    ************************************************************************
  13043.    DECLARATION:
  13044.  
  13045.         function  TrackCursor: Boolean; virtual;
  13046.  
  13047.  
  13048.  
  13049.                                         181
  13050.  
  13051.  
  13052.  
  13053.  
  13054.  
  13055.  
  13056.  
  13057.  
  13058.    UNIT:
  13059.  
  13060.         GLTSHEET.PAS
  13061.  
  13062.    DESCRIPTION:
  13063.  
  13064.         Checks if the cursor is within the limits of the currently displayed
  13065.         screen block.  If not, it ajusts the screen block to include the
  13066.         position of the cursor.
  13067.  
  13068.    ************************************************************************
  13069.    TSpreadSheet.UnlockedHash field
  13070.    ************************************************************************
  13071.    DECLARATION:
  13072.  
  13073.         UnlockedHash : TUnlockedHashTable;
  13074.  
  13075.    UNIT:
  13076.  
  13077.         GLTSHEET.PAS
  13078.  
  13079.    DESCRIPTION:
  13080.  
  13081.         Unlocked hash table that will store which cells are marked as unlocked.
  13082.  
  13083.    ************************************************************************
  13084.    TSpreadSheet.UpdateScreenBlockDisplay procedure
  13085.    ************************************************************************
  13086.    DECLARATION:
  13087.  
  13088.         procedure UpdateScreenBlockDisplay; virtual;
  13089.  
  13090.    UNIT:
  13091.  
  13092.         GLTSHEET.PAS
  13093.  
  13094.    DESCRIPTION:
  13095.  
  13096.         Redisplays the screen and changes the scroll bars position whenever the
  13097.         screen block changes.
  13098.  
  13099.    ************************************************************************
  13100.    TSpreadSheet.WidthHash field
  13101.    ************************************************************************
  13102.    DECLARATION:
  13103.  
  13104.         WidthHash : TWidthHashTable;
  13105.  
  13106.    UNIT:
  13107.  
  13108.         GLTSHEET.PAS
  13109.  
  13110.    DESCRIPTION:
  13111.  
  13112.         Width hash table that will be used to store the widths of the columns of
  13113.         the spreadsheet.
  13114.  
  13115.  
  13116.  
  13117.                                         182
  13118.  
  13119.  
  13120.  
  13121.  
  13122.  
  13123.  
  13124.  
  13125.  
  13126.    ************************************************************************
  13127.    TSpreadSheet.WidthHashStart function
  13128.    ************************************************************************
  13129.    DECLARATION:
  13130.  
  13131.         function  WidthHashStart:BucketRange; virtual;
  13132.  
  13133.    UNIT:
  13134.  
  13135.         GLTSHEET.PAS
  13136.  
  13137.    DESCRIPTION:
  13138.  
  13139.         Returns the number of buckets the width hash table will have.
  13140.  
  13141.    ************************************************************************
  13142.    TSpreadSheet.XToCol fuction
  13143.    ************************************************************************
  13144.    DECLARATION:
  13145.  
  13146.         function  XToCol(X: Byte): Integer; virtual;
  13147.  
  13148.    UNIT:
  13149.  
  13150.         GLTSHEET.PAS
  13151.  
  13152.    DESCRIPTION:
  13153.  
  13154.         Returns the column that includes the given position in the screen.
  13155.  
  13156.    PARAMETERS' DESCRIPTION:
  13157.  
  13158.         X    :    the screen column which will be checked to see which
  13159.                   spreadsheet column includes it
  13160.  
  13161.    ************************************************************************
  13162.    TSpreadSheet.YToRow function
  13163.    ************************************************************************
  13164.    DECLARATION:
  13165.  
  13166.         function  YToRow(Y: Byte): Integer; virtual;
  13167.  
  13168.    UNIT:
  13169.  
  13170.         GLTSHEET.PAS
  13171.  
  13172.    DESCRIPTION:
  13173.  
  13174.         Returns the row that is located in the given position in the screen.
  13175.  
  13176.    PARAMETERS' DESCRIPTION:
  13177.  
  13178.         Y    :    the screen row which will be checked to see which spreadsheet
  13179.                   row is located there
  13180.  
  13181.  
  13182.  
  13183.  
  13184.  
  13185.                                         183
  13186.  
  13187.  
  13188.  
  13189.  
  13190.  
  13191.  
  13192.  
  13193.  
  13194.    ************************************************************************
  13195.    TSpreadSheetWindow object
  13196.    ************************************************************************
  13197.    DECLARATION:
  13198.  
  13199.         TSpreadSheetWindow = object(TWindow)
  13200.           constructor Init(Bounds: TRect; ATitle: String; ANumber:
  13201.             Integer);
  13202.           function GetPalette: PPalette; virtual;
  13203.           procedure SizeLimits(var Min, Max: TPoint); virtual;
  13204.           function StandardScrollBar(AOptions : Word): PLimScrollBar;
  13205.         end; {...TSpreadSheetWindow }
  13206.  
  13207.    UNIT:
  13208.  
  13209.         GLWINDOW.PAS
  13210.  
  13211.    DESCRIPTION:
  13212.  
  13213.         This is a TWindow's descendant that can own a TSpreadSheet object.  It
  13214.         provides a new color palette and overrides some methods to give
  13215.         additional support to a TSpreadSheet object.
  13216.  
  13217.    ************************************************************************
  13218.    TSpreadSheetWindow.GetPalette function
  13219.    ************************************************************************
  13220.    DECLARATION:
  13221.  
  13222.         function GetPalette: PPalette; virtual;
  13223.  
  13224.    UNIT:
  13225.  
  13226.         GLWINDOW.PAS
  13227.  
  13228.    DESCRIPTION:
  13229.  
  13230.         Returns a pointer to the object's new palette.
  13231.  
  13232.    REMARKS:
  13233.  
  13234.         (see CSpreadSheetWindow1)
  13235.  
  13236.  
  13237.    ************************************************************************
  13238.    TSpreadSheetWindow.Init CONSTRUCTOR
  13239.    ************************************************************************
  13240.    DECLARATION:
  13241.  
  13242.         constructor Init(Bounds: TRect; ATitle: String; ANumber:
  13243.           Integer);
  13244.  
  13245.    UNIT:
  13246.  
  13247.         GLWINDOW.PAS
  13248.  
  13249.    DESCRIPTION:
  13250.  
  13251.         Creates and initializes the TSpreadSheetWindow object.
  13252.  
  13253.                                            184
  13254.  
  13255.  
  13256.  
  13257.  
  13258.  
  13259.  
  13260.  
  13261.  
  13262.    PARAMETERS' DESCRIPTION:
  13263.  
  13264.         Bounds    :    the area where the TSpreadSheetWindow object will be
  13265.                        displayed.
  13266.  
  13267.         ATitle    :    the title of the window
  13268.  
  13269.         ANumber   :    the number of the window
  13270.  
  13271.    ************************************************************************
  13272.    TSpreadSheetWindow.SizeLimits procedure
  13273.    ************************************************************************
  13274.    DECLARATION:
  13275.  
  13276.         procedure SizeLimits(var Min, Max: TPoint); virtual;
  13277.  
  13278.    UNIT:
  13279.  
  13280.         GLWINDOW.PAS
  13281.  
  13282.    DESCRIPTION:
  13283.  
  13284.         Returns in the Min and Max parameters the size limits of the window,
  13285.         taking into account the size limits of a spreadsheet.
  13286.  
  13287.    PARAMETERS' DESCRIPTION:
  13288.  
  13289.         Min  :    will contain the minimum size the window can have
  13290.  
  13291.         Max  :    will contain the maximum size the window can have
  13292.  
  13293.    ************************************************************************
  13294.    TSpreadSheetWindow.StandardScrollBar function
  13295.    ************************************************************************
  13296.    DECLARATION:
  13297.  
  13298.         function StandardScrollBar(AOptions : Word): PLimScrollBar;
  13299.  
  13300.    UNIT:
  13301.  
  13302.         GLWINDOW.PAS
  13303.  
  13304.    DESCRIPTION:
  13305.  
  13306.         "Constructs, inserts, and returns a pointer to a "standard" limited
  13307.         scrolling scroll bar [see TLimScrollBar] for the window. "Standard"
  13308.         means the scroll bar fits onto the frame of the window without covering
  13309.         corners or the resize icon."**
  13310.  
  13311.    PARAMETERS' DESCRIPTION:
  13312.  
  13313.         AOptions  :    "AOptions can be either sbHorizontal to produce a
  13314.                        horizontal scroll bar along the bottom of the window or
  13315.                        sbVertical to produce a vertical scroll bar along the
  13316.                        right side of the window."**
  13317.  
  13318.  
  13319.  
  13320.  
  13321.                                         185
  13322.  
  13323.  
  13324.  
  13325.  
  13326.  
  13327.  
  13328.  
  13329.  
  13330.    REMARKS:
  13331.  
  13332.         No keyboard events are handled by a TLimScrollBar object created using
  13333.         this function.
  13334.  
  13335.         **Taken from Borland Pascal's on-line documentation.
  13336.  
  13337.  
  13338.    ************************************************************************
  13339.    TTextCell object
  13340.    ************************************************************************
  13341.    DECLARATION:
  13342.  
  13343.         TTextCell = OBJECT(TCell)
  13344.             Txt : LString;
  13345.           constructor Init(InitLoc : CellPos; InitTxt : String);
  13346.           function CellType : CellTypes; virtual;
  13347.           function LegalValue : Boolean; virtual;
  13348.           function Name : String; virtual;
  13349.           function Format(var FHash : TFormatHashTable;
  13350.             FormulasDisplayed : Boolean) : FormatType; virtual;
  13351.           function Width(var FHash : TFormatHashTable;
  13352.             FormulasDisplayed : Boolean) : Word; virtual;
  13353.           function Overwritten(var CHash : TCellHashTable;
  13354.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  13355.             var LastPos : CellPos; MaxCols : Word;
  13356.             GetColWidth : GetColWidthFunc; FormulasDisplayed : Boolean) :
  13357.             Word; virtual;
  13358.           function ShouldUpdate : Boolean; virtual;
  13359.           function HasError : Boolean; virtual;
  13360.           function CurrValue : Extended; virtual;
  13361.           function OverwriteStart(var FHash : TFormatHashTable;
  13362.             var WHash : TWidthHashTable; GetColWidth : GetColWidthFunc;
  13363.             EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  13364.           procedure EditString(MaxDecPlaces : Byte; var Input : String);
  13365.             virtual;
  13366.           function DisplayString(FormulasDisplayed : Boolean;
  13367.             MaxDecPlaces : Byte) : String; virtual;
  13368.           function FormattedString(var OHash : TOverwriteHashTable;
  13369.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  13370.             GetColWidth : GetColWidthFunc; CPos : CellPos;
  13371.             FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  13372.             var CurrencyString : CurrencyStr; var ClType: CellTypes):
  13373.             String; virtual;
  13374.           function CopyString : String; virtual;
  13375.           constructor Load(var S : TStream);
  13376.           procedure Store(var S : TStream);
  13377.           destructor Done; virtual;
  13378.         end; {...TTextCell }
  13379.  
  13380.    UNIT:
  13381.  
  13382.         GLCELL.PAS
  13383.  
  13384.    DESCRIPTION:
  13385.  
  13386.         A TCell's descendant that stores a string.
  13387.  
  13388.  
  13389.                                         186
  13390.  
  13391.  
  13392.  
  13393.  
  13394.  
  13395.  
  13396.  
  13397.  
  13398.    ************************************************************************
  13399.    TTextCell.CellType function
  13400.    ************************************************************************
  13401.    DECLARATION:
  13402.  
  13403.         (see TCell.CellType)
  13404.  
  13405.    UNIT:
  13406.  
  13407.         GLCELL.PAS
  13408.  
  13409.    ************************************************************************
  13410.    TTextCell.CopyString function
  13411.    ************************************************************************
  13412.    DECLARATION:
  13413.  
  13414.         (see TCell.CopyString)
  13415.  
  13416.    UNIT:
  13417.  
  13418.         GLCELL.PAS
  13419.  
  13420.    ************************************************************************
  13421.    TTextCell.CurrValue function
  13422.    ************************************************************************
  13423.    DECLARATION:
  13424.  
  13425.         (see TCell.CurrValue)
  13426.  
  13427.    UNIT:
  13428.  
  13429.         GLCELL.PAS
  13430.  
  13431.    ************************************************************************
  13432.    TTextCell.DisplayString function
  13433.    ************************************************************************
  13434.    DECLARATION:
  13435.  
  13436.         (see TCell.DisplayString)
  13437.  
  13438.    UNIT:
  13439.  
  13440.         GLCELL.PAS
  13441.  
  13442.    ************************************************************************
  13443.    TTextCell.Done DESTRUCTOR
  13444.    ************************************************************************
  13445.    DECLARATION:
  13446.  
  13447.         destructor Done; virtual;
  13448.  
  13449.    UNIT:
  13450.  
  13451.         GLCELL.PAS
  13452.  
  13453.    DESCRIPTION:
  13454.  
  13455.         Performs all the necessary cleanup and disposal of the TTextCell object.
  13456.  
  13457.                                            187
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.  
  13466.    ************************************************************************
  13467.    TTextCell.EditString procedure
  13468.    ************************************************************************
  13469.    DECLARATION:
  13470.  
  13471.         (see TCell.EditString)
  13472.  
  13473.    UNIT:
  13474.  
  13475.         GLCELL.PAS
  13476.  
  13477.    ************************************************************************
  13478.    TTextCell.Format function
  13479.    ************************************************************************
  13480.    DECLARATION:
  13481.  
  13482.         (see TCell.Format)
  13483.  
  13484.    UNIT:
  13485.  
  13486.         GLCELL.PAS
  13487.  
  13488.    ************************************************************************
  13489.    TTextCell.FormattedString function
  13490.    ************************************************************************
  13491.    DECLARATION:
  13492.  
  13493.         (see TCell.FormattedString)
  13494.  
  13495.    UNIT:
  13496.  
  13497.         GLCELL.PAS
  13498.  
  13499.    ************************************************************************
  13500.    TTextCell.HasError function
  13501.    ************************************************************************
  13502.    DECLARATION:
  13503.  
  13504.         (see TCell.HasError)
  13505.  
  13506.    UNIT:
  13507.  
  13508.         GLCELL.PAS
  13509.  
  13510.    ************************************************************************
  13511.    TTextCell.Init CONSTRUCTOR
  13512.    ************************************************************************
  13513.    DECLARATION:
  13514.  
  13515.         constructor Init(InitLoc : CellPos; InitTxt : String);
  13516.  
  13517.    UNIT:
  13518.  
  13519.         GLCELL.PAS
  13520.  
  13521.    DESCRIPTION:
  13522.  
  13523.         Creates and initializes the TTextCell object.
  13524.  
  13525.                                            188
  13526.  
  13527.  
  13528.  
  13529.  
  13530.  
  13531.  
  13532.  
  13533.  
  13534.    PARAMETERS' DESCRIPTION:
  13535.  
  13536.         InitLoc   :    the position of the cell in the spreadsheet.
  13537.  
  13538.         InitTxt   :    the string the cell will store.
  13539.  
  13540.    ************************************************************************
  13541.    TTextCell.LegalValue function
  13542.    ************************************************************************
  13543.    DECLARATION:
  13544.  
  13545.         (see TCell.LegalValue)
  13546.  
  13547.    UNIT:
  13548.  
  13549.         GLCELL.PAS
  13550.  
  13551.    ************************************************************************
  13552.    TTextCell.Load CONSTRUCTOR
  13553.    ************************************************************************
  13554.    DECLARATION:
  13555.  
  13556.         constructor Load(var S: TStream);
  13557.  
  13558.    UNIT:
  13559.  
  13560.         GLCELL.PAS
  13561.  
  13562.    DESCRIPTION:
  13563.  
  13564.         Loads the cell's contents from disk.
  13565.  
  13566.    PARAMETERS' DESCRIPTION:
  13567.  
  13568.         S : the stream from which will be read the cell's contents.
  13569.  
  13570.    ************************************************************************
  13571.    TTextCell.Name function
  13572.    ************************************************************************
  13573.    DECLARATION:
  13574.  
  13575.         (see TCell.Name)
  13576.  
  13577.    UNIT:
  13578.  
  13579.         GLCELL.PAS
  13580.  
  13581.    ************************************************************************
  13582.    TTextCell.OverwriteStart function
  13583.    ************************************************************************
  13584.    DECLARATION:
  13585.  
  13586.         (see TCell.OverwriteStart)
  13587.  
  13588.    UNIT:
  13589.  
  13590.         GLCELL.PAS
  13591.  
  13592.  
  13593.                                         189
  13594.  
  13595.  
  13596.  
  13597.  
  13598.  
  13599.  
  13600.  
  13601.  
  13602.    ************************************************************************
  13603.    TTextCell.Overwritten function
  13604.    ************************************************************************
  13605.    DECLARATION:
  13606.  
  13607.         (see TCell.Overwritten)
  13608.  
  13609.    UNIT:
  13610.  
  13611.         GLCELL.PAS
  13612.  
  13613.    ************************************************************************
  13614.    TTextCell.ShouldUpdate function
  13615.    ************************************************************************
  13616.    DECLARATION:
  13617.  
  13618.         (see TCell.ShouldUpdate)
  13619.  
  13620.    UNIT:
  13621.  
  13622.         GLCELL.PAS
  13623.  
  13624.    ************************************************************************
  13625.    TTextCell.Store procedure
  13626.    ************************************************************************
  13627.    DECLARATION:
  13628.  
  13629.         procedure Store(var S: TStream);
  13630.  
  13631.    UNIT:
  13632.  
  13633.         GLCELL.PAS
  13634.  
  13635.    DESCRIPTION:
  13636.  
  13637.         Writes the cell's contents to disk.
  13638.  
  13639.    PARAMETERS' DESCRIPTION:
  13640.  
  13641.         S : the stream to which the cell's contents will be written.
  13642.  
  13643.    ************************************************************************
  13644.    TTextCell.Txt field
  13645.    ************************************************************************
  13646.    DECLARATION:
  13647.  
  13648.         Txt : LString;
  13649.  
  13650.    UNIT:
  13651.  
  13652.         GLCELL.PAS
  13653.  
  13654.    DESCRIPTION:
  13655.  
  13656.         Used to store the cell's contents.
  13657.  
  13658.  
  13659.  
  13660.  
  13661.                                         190
  13662.  
  13663.  
  13664.  
  13665.  
  13666.  
  13667.  
  13668.  
  13669.  
  13670.    REMARKS:
  13671.  
  13672.         Txt is a long string object that can store a string of any size up to
  13673.         65535 characters long.  In OOGrid Library(TM) v1.0, however, because of
  13674.         the 255 characters limitation of the TInputLine object, it is used to
  13675.         store strings up to 255 characters long.
  13676.  
  13677.         A long string object is used because, unlike a normal string that uses
  13678.         all 255 bytes even if the text stored in it is one character long, the
  13679.         memory it requires depends on the length of the string.
  13680.  
  13681.         (see GLLSTR.INT)
  13682.  
  13683.  
  13684.    ************************************************************************
  13685.    TTextCell.Width function
  13686.    ************************************************************************
  13687.    DECLARATION:
  13688.  
  13689.         (see TCell.Width)
  13690.  
  13691.    UNIT:
  13692.  
  13693.         GLCELL.PAS
  13694.  
  13695.    ************************************************************************
  13696.    TUnlockedHashTable object
  13697.    ************************************************************************
  13698.    DECLARATION:
  13699.  
  13700.         TUnlockedHashTable = OBJECT(THashTable)
  13701.             CurrStart,
  13702.             CurrStop : CellPos;
  13703.           constructor Init;
  13704.           function Add(NewStart, NewStop: CellPos): Boolean;
  13705.           procedure CreateItem(var Item: HashItemPtr); virtual;
  13706.           function Delete(DStart, DStop: CellPos): Boolean;
  13707.           function Found(Item: HashItemPtr): Boolean; virtual;
  13708.           function HashValue : LongInt; virtual;
  13709.           function ItemSize : HashItemSizeRange; virtual;
  13710.           constructor Load(var S: TStream; Total: Longint);
  13711.           function Overwrite(NewStart, NewStop: CellPos): Boolean;
  13712.           function Search(SPos: CellPos): Boolean;
  13713.           procedure Store(var S: TStream);
  13714.           destructor Done;
  13715.         end; {...TUnlockedHashTable }
  13716.  
  13717.    UNIT:
  13718.  
  13719.         GLCELL.PAS
  13720.  
  13721.    DESCRIPTION:
  13722.  
  13723.         Keeps track of unlocked cells in the spreadsheet.
  13724.  
  13725.    REMARKS:
  13726.  
  13727.         It stores areas that are marked as unlocked.
  13728.  
  13729.                                            191
  13730.  
  13731.  
  13732.  
  13733.  
  13734.  
  13735.  
  13736.  
  13737.  
  13738.         (see TSpreadSheet.SetProtection, TSpreadSheet.SetUnlocked,
  13739.         TSpreadSheet.SetLocked)
  13740.  
  13741.  
  13742.    ************************************************************************
  13743.    TUnlockedHashTable.Add function
  13744.    ************************************************************************
  13745.    DECLARATION:
  13746.  
  13747.         function Add(NewStart, NewStop: CellPos): Boolean;
  13748.  
  13749.    UNIT:
  13750.  
  13751.         GLCELL.PAS
  13752.  
  13753.    DESCRIPTION:
  13754.  
  13755.         Adds an block (area) of cells to the unlocked hash table.
  13756.  
  13757.    PARAMETERS' DESCRIPTION:
  13758.  
  13759.         NewStart  :    The upper left corner of the area being added.
  13760.  
  13761.         NewStop   :    The lower right corner of the area being added.
  13762.  
  13763.    REMARKS:
  13764.  
  13765.         Returns TRUE if the area was added sucessfully.
  13766.  
  13767.  
  13768.    ************************************************************************
  13769.    TUnlockedHashTable.CreateItem procedure
  13770.    ************************************************************************
  13771.    DECLARATION:
  13772.  
  13773.         (see TCellHashTable.CreateItem)
  13774.  
  13775.    UNIT:
  13776.  
  13777.         GLCELL.PAS
  13778.  
  13779.    ************************************************************************
  13780.    TUnlockedHashTable.CurrStart field
  13781.    ************************************************************************
  13782.    DECLARATION:
  13783.  
  13784.         CurrStart : CellPos;
  13785.  
  13786.    UNIT:
  13787.  
  13788.         GLCELL.PAS
  13789.  
  13790.    DESCRIPTION:
  13791.  
  13792.         Stores the location in the spreadsheet of the upper left corner of the
  13793.         block (area) of cells that is being added to the hash table;  also used
  13794.         by the Search function to store the position of the cell that is being
  13795.         searched.
  13796.  
  13797.                                            192
  13798.  
  13799.  
  13800.  
  13801.  
  13802.  
  13803.  
  13804.  
  13805.  
  13806.    REMARKS:
  13807.  
  13808.         You will never need to access this field directly.
  13809.  
  13810.         (see TUnlockedHashTable.CurrStop, TUnlockedHashTable.Search)
  13811.  
  13812.  
  13813.    ************************************************************************
  13814.    TUnlockedHashTable.CurrStop field
  13815.    ************************************************************************
  13816.    DECLARATION:
  13817.  
  13818.         CurrStop : CellPos;
  13819.  
  13820.    UNIT:
  13821.  
  13822.         GLCELL.PAS
  13823.  
  13824.    DESCRIPTION:
  13825.  
  13826.         Stores the location in the spreadsheet of the lower right corner of the
  13827.         block (area) of cells that is being added to the hash table.
  13828.  
  13829.    REMARKS:
  13830.  
  13831.         (see TUnlockedHashTable.CurrStart)
  13832.  
  13833.  
  13834.    ************************************************************************
  13835.    TUnlockedHashTable.Delete procedure
  13836.    ************************************************************************
  13837.    DECLARATION:
  13838.  
  13839.         (see TFormatHashTable.Delete)
  13840.  
  13841.    UNIT:
  13842.  
  13843.         GLCELL.PAS
  13844.  
  13845.    ************************************************************************
  13846.    TUnlockedHashTable.Done DESTRUCTOR
  13847.    ************************************************************************
  13848.    DECLARATION:
  13849.  
  13850.         destructor Done;
  13851.  
  13852.    UNIT:
  13853.  
  13854.         GLCELL.PAS
  13855.  
  13856.    DESCRIPTION:
  13857.  
  13858.         Performs the necessary cleanup and disposal of the unlocked hash table.
  13859.  
  13860.  
  13861.  
  13862.  
  13863.  
  13864.  
  13865.                                         193
  13866.  
  13867.  
  13868.  
  13869.  
  13870.  
  13871.  
  13872.  
  13873.  
  13874.    ************************************************************************
  13875.    TUnlockedHashTable.Found function
  13876.    ************************************************************************
  13877.    DECLARATION:
  13878.  
  13879.         (see TCellHashTable.Found)
  13880.  
  13881.    UNIT:
  13882.  
  13883.         GLCELL.PAS
  13884.  
  13885.    ************************************************************************
  13886.    TUnlockedHashTable.HashValue function
  13887.    ************************************************************************
  13888.    DECLARATION:
  13889.  
  13890.         (see TCellHashTable.HashValue)
  13891.  
  13892.    UNIT:
  13893.  
  13894.         GLCELL.PAS
  13895.  
  13896.    ************************************************************************
  13897.    TUnlockedHashTable.Init CONSTRUCTOR
  13898.    ************************************************************************
  13899.    DECLARATION:
  13900.  
  13901.         constructor Init;
  13902.  
  13903.    UNIT:
  13904.  
  13905.         GLCELL.PAS
  13906.  
  13907.    DESCRIPTION:
  13908.  
  13909.         Creates and initializes the TUnlockedHashTable object.
  13910.  
  13911.    ************************************************************************
  13912.    TUnlockedHashTable.ItemSize function
  13913.    ************************************************************************
  13914.    DECLARATION:
  13915.  
  13916.         (see TCellHashTable.ItemSize)
  13917.  
  13918.    UNIT:
  13919.  
  13920.         GLCELL.PAS
  13921.  
  13922.    ************************************************************************
  13923.    TUnlockedHashTable.Load CONSTRUCTOR
  13924.    ************************************************************************
  13925.    DECLARATION:
  13926.  
  13927.         constructor Load(var S: TStream; Total: Longint);
  13928.  
  13929.    UNIT:
  13930.  
  13931.         GLCELL.PAS
  13932.  
  13933.                                         194
  13934.  
  13935.  
  13936.  
  13937.  
  13938.  
  13939.  
  13940.  
  13941.  
  13942.    DESCRIPTION:
  13943.  
  13944.         Loads an unlocked hash table from disk.
  13945.  
  13946.    PARAMETERS' DESCRIPTION:
  13947.  
  13948.         S     :   the stream from which the unlocked hash table will be loaded.
  13949.  
  13950.         Total :   the total number of items that will be loaded from the stream.
  13951.  
  13952.    ************************************************************************
  13953.    TUnlockedHashTable.Overwrite function
  13954.    ************************************************************************
  13955.    DECLARATION:
  13956.  
  13957.         (see TFormatHashTable.Overwrite)
  13958.  
  13959.    UNIT:
  13960.  
  13961.         GLCELL.PAS
  13962.  
  13963.    ************************************************************************
  13964.    TUnlockedHashTable.Search function
  13965.    ************************************************************************
  13966.    DECLARATION:
  13967.  
  13968.         function Search(SPos: CellPos): Boolean;
  13969.  
  13970.    UNIT:
  13971.  
  13972.         GLCELL.PAS
  13973.  
  13974.    DESCRIPTION:
  13975.  
  13976.         Checks if a cell is part of any of the areas stored in the unlocked hash
  13977.         table.
  13978.  
  13979.    PARAMETERS' DESCRIPTION:
  13980.  
  13981.         SPos : position of the cell being checked.
  13982.  
  13983.    REMARKS:
  13984.  
  13985.         If Search returns TRUE, the cell is unlocked and therefore can be
  13986.         modified at any time, even when the spreadsheet is protected.
  13987.  
  13988.         (see TSpreadSheet.SetProtection)
  13989.  
  13990.  
  13991.    ************************************************************************
  13992.    TUnlockedHashTable.Store procedure
  13993.    ************************************************************************
  13994.    DECLARATION:
  13995.  
  13996.         procedure Store(var S: TStream);
  13997.  
  13998.  
  13999.  
  14000.  
  14001.                                         195
  14002.  
  14003.  
  14004.  
  14005.  
  14006.  
  14007.  
  14008.  
  14009.  
  14010.    UNIT:
  14011.  
  14012.         GLCELL.PAS
  14013.  
  14014.    DESCRIPTION:
  14015.  
  14016.         Writes an unlocked hash table to disk.
  14017.  
  14018.    PARAMETERS' DESCRIPTION:
  14019.  
  14020.         S : stream to which the unlocked hash table will be written.
  14021.  
  14022.    ************************************************************************
  14023.    TValueCell object
  14024.    ************************************************************************
  14025.    DECLARATION:
  14026.  
  14027.         TValueCell = object(TCell)
  14028.             Error : Boolean;
  14029.             Value : Extended;
  14030.           constructor Init(InitLoc : CellPos; InitError : Boolean;
  14031.             InitValue : Extended);
  14032.           function CellType : CellTypes; virtual;
  14033.           function LegalValue : Boolean; virtual;
  14034.           function Name : String; virtual;
  14035.           function Format(var FHash : TFormatHashTable;
  14036.             FormulasDisplayed : Boolean) : FormatType; virtual;
  14037.           function Width(var FHash : TFormatHashTable;
  14038.             FormulasDisplayed : Boolean) : Word; virtual;
  14039.           function Overwritten(var CHash : TCellHashTable;
  14040.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  14041.             var LastPos : CellPos; MaxCols : Word;
  14042.             GetColWidth : GetColWidthFunc; FormulasDisplayed : Boolean) :
  14043.             Word; virtual;
  14044.           function ShouldUpdate : Boolean; virtual;
  14045.           function HasError : Boolean; virtual;
  14046.           function CurrValue : Extended; virtual;
  14047.           function OverwriteStart(var FHash : TFormatHashTable;
  14048.             var WHash : TWidthHashTable; GetColWidth : GetColWidthFunc;
  14049.             EndCol : Word; DisplayFormulas : Boolean) : Word; virtual;
  14050.           procedure EditString(MaxDecPlaces : Byte; var Input : String);
  14051.             virtual;
  14052.           function DisplayString(FormulasDisplayed : Boolean;
  14053.             MaxDecPlaces : Byte) : String; virtual;
  14054.           function FormattedString(var OHash : TOverwriteHashTable;
  14055.             var FHash : TFormatHashTable; var WHash : TWidthHashTable;
  14056.             GetColWidth : GetColWidthFunc; CPos : CellPos;
  14057.             FormulasDisplayed : Boolean; Start : Word; ColWidth : Byte;
  14058.             var CurrencyString : CurrencyStr; var ClType: CellTypes):
  14059.             String; virtual;
  14060.           function CopyString : String; virtual;
  14061.           constructor Load(var S : TStream);
  14062.           procedure Store(var S : TStream);
  14063.         end; {...TValueCell }
  14064.  
  14065.    UNIT:
  14066.  
  14067.         GLCELL.PAS
  14068.  
  14069.                                         196
  14070.  
  14071.  
  14072.  
  14073.  
  14074.  
  14075.  
  14076.  
  14077.  
  14078.    DESCRIPTION:
  14079.  
  14080.         A TCell's descendant that stores a number.
  14081.  
  14082.    ************************************************************************
  14083.    TValueCell.CellType function
  14084.    ************************************************************************
  14085.    DECLARATION:
  14086.  
  14087.         (see TCell.CellType)
  14088.  
  14089.    UNIT:
  14090.  
  14091.         GLCELL.PAS
  14092.  
  14093.    ************************************************************************
  14094.    TValueCell.CopyString function
  14095.    ************************************************************************
  14096.    DECLARATION:
  14097.  
  14098.         (see TCell.CopyString)
  14099.  
  14100.    UNIT:
  14101.  
  14102.         GLCELL.PAS
  14103.  
  14104.    ************************************************************************
  14105.    TValueCell.CurrValue function
  14106.    ************************************************************************
  14107.    DECLARATION:
  14108.  
  14109.         (see TCell.CurrValue)
  14110.  
  14111.    UNIT:
  14112.  
  14113.         GLCELL.PAS
  14114.  
  14115.    ************************************************************************
  14116.    TValueCell.DisplayString function
  14117.    ************************************************************************
  14118.    DECLARATION:
  14119.  
  14120.         (see TCell.DisplayString)
  14121.  
  14122.    UNIT:
  14123.  
  14124.         GLCELL.PAS
  14125.  
  14126.    ************************************************************************
  14127.    TValueCell.EditString procedure
  14128.    ************************************************************************
  14129.    DECLARATION:
  14130.  
  14131.         (see TCell.EditString)
  14132.  
  14133.    UNIT:
  14134.  
  14135.         GLCELL.PAS
  14136.  
  14137.                                         197
  14138.  
  14139.  
  14140.  
  14141.  
  14142.  
  14143.  
  14144.  
  14145.  
  14146.    ************************************************************************
  14147.    TValueCell.Error field
  14148.    ************************************************************************
  14149.    DECLARATION:
  14150.  
  14151.         Error : Boolean;
  14152.  
  14153.    UNIT:
  14154.  
  14155.         GLCELL.PAS
  14156.  
  14157.    DESCRIPTION:
  14158.  
  14159.         Indicates if there is a numeric error in the value stored by the cell.
  14160.  
  14161.    ************************************************************************
  14162.    TValueCell.Format function
  14163.    ************************************************************************
  14164.    DECLARATION:
  14165.  
  14166.         (see TCell.Format)
  14167.  
  14168.    UNIT:
  14169.  
  14170.         GLCELL.PAS
  14171.  
  14172.    ************************************************************************
  14173.    TValueCell.FormattedString function
  14174.    ************************************************************************
  14175.    DECLARATION:
  14176.  
  14177.         (see TCell.FormattedString)
  14178.  
  14179.    UNIT:
  14180.  
  14181.         GLCELL.PAS
  14182.  
  14183.    ************************************************************************
  14184.    TValueCell.HasError function
  14185.    ************************************************************************
  14186.    DECLARATION:
  14187.  
  14188.         (see TCell.HasError)
  14189.  
  14190.    UNIT:
  14191.  
  14192.         GLCELL.PAS
  14193.  
  14194.    ************************************************************************
  14195.    TValueCell.Init CONSTRUCTOR
  14196.    ************************************************************************
  14197.    DECLARATION:
  14198.  
  14199.         constructor Init(InitLoc : CellPos; InitError : Boolean;
  14200.           InitValue : Extended);
  14201.  
  14202.  
  14203.  
  14204.  
  14205.                                         198
  14206.  
  14207.  
  14208.  
  14209.  
  14210.  
  14211.  
  14212.  
  14213.  
  14214.    UNIT:
  14215.  
  14216.         GLCELL.PAS
  14217.  
  14218.    DESCRIPTION:
  14219.  
  14220.         Creates and initializes the TValueCell object.
  14221.  
  14222.    PARAMETERS' DESCRIPTION:
  14223.  
  14224.         InitLoc   :    the position of cell in the spreadsheet.
  14225.  
  14226.         InitError :    indicates if there is an error in the value.
  14227.  
  14228.         InitValue :    the value to be stored by the cell.
  14229.  
  14230.    ************************************************************************
  14231.    TValueCell.LegalValue function
  14232.    ************************************************************************
  14233.    DECLARATION:
  14234.  
  14235.         (see TCell.LegalValue)
  14236.  
  14237.    UNIT:
  14238.  
  14239.         GLCELL.PAS
  14240.  
  14241.    ************************************************************************
  14242.    TValueCell.Load CONSTRUCTOR
  14243.    ************************************************************************
  14244.    DECLARATION:
  14245.  
  14246.         constructor Load(var S: TStream);
  14247.  
  14248.    UNIT:
  14249.  
  14250.         GLCELL.PAS
  14251.  
  14252.    DESCRIPTION:
  14253.  
  14254.         Loads the cell's contents from disk.
  14255.  
  14256.    PARAMETERS' DESCRIPTION:
  14257.  
  14258.         S : the stream from which will be read the cell's contents.
  14259.  
  14260.    ************************************************************************
  14261.    TValueCell.Name function
  14262.    ************************************************************************
  14263.    DECLARATION:
  14264.  
  14265.         (see TCell.Name)
  14266.  
  14267.    UNIT:
  14268.  
  14269.         GLCELL.PAS
  14270.  
  14271.  
  14272.  
  14273.                                         199
  14274.  
  14275.  
  14276.  
  14277.  
  14278.  
  14279.  
  14280.  
  14281.  
  14282.    ************************************************************************
  14283.    TValueCell.OverwriteStart function
  14284.    ************************************************************************
  14285.    DECLARATION:
  14286.  
  14287.         (see TCell.OverwriteStart)
  14288.  
  14289.    UNIT:
  14290.  
  14291.         GLCELL.PAS
  14292.  
  14293.    ************************************************************************
  14294.    TValueCell.Overwritten function
  14295.    ************************************************************************
  14296.    DECLARATION:
  14297.  
  14298.         (see TCell.Overwritten)
  14299.  
  14300.    UNIT:
  14301.  
  14302.         GLCELL.PAS
  14303.  
  14304.    ************************************************************************
  14305.    TValueCell.ShouldUpdate function
  14306.    ************************************************************************
  14307.    DECLARATION:
  14308.  
  14309.         (see TCell.ShouldUpdate)
  14310.  
  14311.    UNIT:
  14312.  
  14313.         GLCELL.PAS
  14314.  
  14315.    ************************************************************************
  14316.    TValueCell.Store procedure
  14317.    ************************************************************************
  14318.    DECLARATION:
  14319.  
  14320.         procedure Store(var S: TStream);
  14321.  
  14322.    UNIT:
  14323.  
  14324.         GLCELL.PAS
  14325.  
  14326.    DESCRIPTION:
  14327.  
  14328.         Writes the cell's contents to disk.
  14329.  
  14330.    PARAMETERS' DESCRIPTION:
  14331.  
  14332.         S : the stream to which the cell's contents will be written.
  14333.  
  14334.    ************************************************************************
  14335.    TValueCell.Value field
  14336.    ************************************************************************
  14337.    DECLARATION:
  14338.  
  14339.         Value : Extended;
  14340.  
  14341.                                            200
  14342.  
  14343.  
  14344.  
  14345.  
  14346.  
  14347.  
  14348.  
  14349.  
  14350.    UNIT:
  14351.  
  14352.         GLCELL.PAS
  14353.  
  14354.    DESCRIPTION:
  14355.  
  14356.         The value stored by the cell.
  14357.  
  14358.    ************************************************************************
  14359.    TValueCell.Width function
  14360.    ************************************************************************
  14361.    DECLARATION:
  14362.  
  14363.         (see TCell.Width)
  14364.  
  14365.    UNIT:
  14366.  
  14367.         GLCELL.PAS
  14368.  
  14369.    ************************************************************************
  14370.    TWidthHashTable object
  14371.    ************************************************************************
  14372.    DECLARATION:
  14373.  
  14374.         TWidthHashTable = OBJECT(THashTable)
  14375.             CurrCol : Word;
  14376.             CurrWidth : Byte;
  14377.             DefaultColWidth : Byte;
  14378.           constructor Init(InitBuckets: BucketRange;
  14379.             InitDefaultColWidth: Byte);
  14380.           destructor Done;
  14381.           function Add(SCol : Word; NewWidth : Byte) : Boolean;
  14382.           procedure Delete(Col : Word);
  14383.           function Search(Col : Word) : Byte;
  14384.           function HashValue : LongInt; virtual;
  14385.           function Found(Item : HashItemPtr) : Boolean; virtual;
  14386.           procedure CreateItem(var Item : HashItemPtr); virtual;
  14387.           function ItemSize : HashItemSizeRange; virtual;
  14388.           function GetDefaultColWidth : Byte;
  14389.           procedure Load(var S : TStream; Total : Longint);
  14390.           procedure Store(var S : TStream);
  14391.         end; {...TWidthHashTable }
  14392.  
  14393.    UNIT:
  14394.  
  14395.         GLCELL.PAS
  14396.  
  14397.    DESCRIPTION:
  14398.  
  14399.         Stores column widths that are different from the default.
  14400.  
  14401.    REMARKS:
  14402.  
  14403.         The width hash table stores the column number and the width.
  14404.  
  14405.  
  14406.  
  14407.  
  14408.  
  14409.                                         201
  14410.  
  14411.  
  14412.  
  14413.  
  14414.  
  14415.  
  14416.  
  14417.  
  14418.    ************************************************************************
  14419.    TWidthHashTable.Add function
  14420.    ************************************************************************
  14421.    DECLARATION:
  14422.  
  14423.         function Add(SCol : Word; NewWidth : Byte) : Boolean;
  14424.  
  14425.    UNIT:
  14426.  
  14427.         GLCELL.PAS
  14428.  
  14429.    DESCRIPTION:
  14430.  
  14431.         Adds a new column width to the width hash table.
  14432.  
  14433.    PARAMETERS' DESCRIPTION:
  14434.  
  14435.         SCol      :    the number of the column whose width will be added to the
  14436.                        width hash table.
  14437.  
  14438.         NewWidth  :    the value of the new width being added.
  14439.  
  14440.    REMARKS:
  14441.  
  14442.         Add returns TRUE if the new width was successfully added; FALSE
  14443.         otherwise.
  14444.  
  14445.         IMPORTANT!  This method does not check if the new width assigned to a
  14446.         column is different from the default width before adding it to the hash
  14447.         table; it will add it anyway.
  14448.  
  14449.  
  14450.    ************************************************************************
  14451.    TWidthHashTable.CreateItem function
  14452.    ************************************************************************
  14453.    DECLARATION:
  14454.  
  14455.         (see TCellHashTable.CreateItem)
  14456.  
  14457.    UNIT:
  14458.  
  14459.         GLCELL.PAS
  14460.  
  14461.    ************************************************************************
  14462.    TWidthHashTable.CurrCol field
  14463.    ************************************************************************
  14464.    DECLARATION:
  14465.  
  14466.         CurrCol : Word;
  14467.  
  14468.    UNIT:
  14469.  
  14470.         GLCELL.PAS
  14471.  
  14472.    DESCRIPTION:
  14473.  
  14474.         Stores the number of the column whose width is being added, searched for
  14475.         or deleted from the width hash table.
  14476.  
  14477.                                            202
  14478.  
  14479.  
  14480.  
  14481.  
  14482.  
  14483.  
  14484.  
  14485.  
  14486.    REMARKS:
  14487.  
  14488.         You will never need to access this field directly.
  14489.  
  14490.  
  14491.    ************************************************************************
  14492.    TWidthHashTable.CurrWidth field
  14493.    ************************************************************************
  14494.    DECLARATION:
  14495.  
  14496.         CurrWidth : Byte;
  14497.  
  14498.    UNIT:
  14499.  
  14500.         GLCELL.PAS
  14501.  
  14502.    DESCRIPTION:
  14503.  
  14504.         Stores the value of the width being added or searched for -- if found --
  14505.         in the width hash table.
  14506.  
  14507.    REMARKS:
  14508.  
  14509.         You will never need to access this field directly.
  14510.  
  14511.  
  14512.    ************************************************************************
  14513.    TWidthHashTable.DefaultColWidth field
  14514.    ************************************************************************
  14515.    DECLARATION:
  14516.  
  14517.         DefaultColWidth : Byte;
  14518.  
  14519.    UNIT:
  14520.  
  14521.         GLCELL.PAS
  14522.  
  14523.    DESCRIPTION:
  14524.  
  14525.         Stores the default column width.
  14526.  
  14527.    REMARKS:
  14528.  
  14529.         This field is accessed only by TWidthHashTable.GetDefaultColWidth.  You
  14530.         will never need to access this field directly.
  14531.  
  14532.  
  14533.    ************************************************************************
  14534.    TWidthHashTable.Delete procedure
  14535.    ************************************************************************
  14536.    DECLARATION:
  14537.  
  14538.         procedure Delete(Col : Word);
  14539.  
  14540.    UNIT:
  14541.  
  14542.         GLCELL.PAS
  14543.  
  14544.  
  14545.                                         203
  14546.  
  14547.  
  14548.  
  14549.  
  14550.  
  14551.  
  14552.  
  14553.  
  14554.    DESCRIPTION:
  14555.  
  14556.         Deletes a column width from the width hash table.
  14557.  
  14558.    PARAMETERS' DESCRIPTION:
  14559.  
  14560.         Col  :    the number of the column whose width will be deleted from the
  14561.                   width hash table.
  14562.  
  14563.    ************************************************************************
  14564.    TWidthHashTable.Done DESTRUCTOR
  14565.    ************************************************************************
  14566.    DECLARATION:
  14567.  
  14568.         destructor Done;
  14569.  
  14570.    UNIT:
  14571.  
  14572.         GLCELL.PAS
  14573.  
  14574.    DESCRIPTION:
  14575.  
  14576.         Performs the necessary cleanup and disposal of the width hash table.
  14577.  
  14578.    ************************************************************************
  14579.    TWidthHashTable.Found function
  14580.    ************************************************************************
  14581.    DECLARATION:
  14582.  
  14583.         (see TCellHashTable.Found)
  14584.  
  14585.    UNIT:
  14586.  
  14587.         GLCELL.PAS
  14588.  
  14589.    ************************************************************************
  14590.    TWidthHashTable.GetDefaultColWidth function
  14591.    ************************************************************************
  14592.    DECLARATION:
  14593.  
  14594.         function GetDefaultColWidth : Byte;
  14595.  
  14596.    UNIT:
  14597.  
  14598.         GLCELL.PAS
  14599.  
  14600.    DESCRIPTION:
  14601.  
  14602.         Returns the default column width.
  14603.  
  14604.    REMARKS:
  14605.  
  14606.         It returns the value stored in the DefaultColWidth field.
  14607.  
  14608.         This method is used only by the private function GetColWidth in
  14609.         GLTSHEET.PAS (see GetColWidth).
  14610.  
  14611.  
  14612.  
  14613.                                         204
  14614.  
  14615.  
  14616.  
  14617.  
  14618.  
  14619.  
  14620.  
  14621.  
  14622.    ************************************************************************
  14623.    TWidthHashTable.HashValue function
  14624.    ************************************************************************
  14625.    DECLARATION:
  14626.  
  14627.         (see TCellHashTable.HashValue)
  14628.  
  14629.    UNIT:
  14630.  
  14631.         GLCELL.PAS
  14632.  
  14633.    ************************************************************************
  14634.    TWidthHashTable.Init CONSTRUCTOR
  14635.    ************************************************************************
  14636.    DECLARATION:
  14637.  
  14638.         constructor Init(InitBuckets: BucketRange;  
  14639.           InitDefaultColWidth: Byte);
  14640.  
  14641.    UNIT:
  14642.  
  14643.         GLCELL.PAS
  14644.  
  14645.    DESCRIPTION:
  14646.  
  14647.         Creates and initializes the TWidthHashTable object.
  14648.  
  14649.    PARAMETERS' DESCRIPTION:
  14650.  
  14651.         InitBuckets         :    number of buckets (linked lists) the width hash
  14652.                                  table will have.
  14653.  
  14654.         InitDefaultColWidth :    default value for a column's width.
  14655.  
  14656.    REMARKS:
  14657.  
  14658.         (see TWidthHashTable)
  14659.  
  14660.  
  14661.    ************************************************************************
  14662.    TWidthHashTable.ItemSize function
  14663.    ************************************************************************
  14664.    DECLARATION:
  14665.  
  14666.         (see TCellHashTable.ItemSize)
  14667.  
  14668.    UNIT:
  14669.  
  14670.         GLCELL.PAS
  14671.  
  14672.    ************************************************************************
  14673.    TWidthHashTable.Load procedure
  14674.    ************************************************************************
  14675.    DECLARATION:
  14676.  
  14677.         procedure Load(var S : TStream; Total : Longint);
  14678.  
  14679.  
  14680.  
  14681.                                         205
  14682.  
  14683.  
  14684.  
  14685.  
  14686.  
  14687.  
  14688.  
  14689.  
  14690.    UNIT:
  14691.  
  14692.         GLCELL.PAS
  14693.  
  14694.    DESCRIPTION:
  14695.  
  14696.         Loads a width hash table from disk.
  14697.  
  14698.    PARAMETERS' DESCRIPTION:
  14699.  
  14700.         S     :   the stream from which the width hash table will be loaded.
  14701.  
  14702.         Total :   the total number of HashItems that will be loaded from the
  14703.                   stream.
  14704.  
  14705.    ************************************************************************
  14706.    TWidthHashTable.Search function
  14707.    ************************************************************************
  14708.    DECLARATION:
  14709.  
  14710.         function Search(Col : Word) : Byte;
  14711.  
  14712.    UNIT:
  14713.  
  14714.         GLCELL.PAS
  14715.  
  14716.    DESCRIPTION:
  14717.  
  14718.         Searches in the width hash table for the width of a column.
  14719.  
  14720.    PARAMETERS' DESCRIPTION:
  14721.  
  14722.         Col : The number of the column whose width is being searched.
  14723.  
  14724.    REMARKS:
  14725.  
  14726.         If the column has not been assigned a width different from the default
  14727.         width, and therefore, it is not found in the width hash table, Search
  14728.         will return 0;  otherwise, it will return the width of the column.
  14729.  
  14730.  
  14731.    ************************************************************************
  14732.    TWidthHashTable.Store procedure
  14733.    ************************************************************************
  14734.    DECLARATION:
  14735.  
  14736.         procedure Store(var S : TStream);
  14737.  
  14738.    UNIT:
  14739.  
  14740.         GLCELL.PAS
  14741.  
  14742.    DESCRIPTION:
  14743.  
  14744.         Writes a width hash table to disk.
  14745.  
  14746.  
  14747.  
  14748.  
  14749.                                         206
  14750.  
  14751.  
  14752.  
  14753.  
  14754.  
  14755.  
  14756.  
  14757.  
  14758.    PARAMETERS' DESCRIPTION:
  14759.  
  14760.         S : the stream to which the width hash table will be written.
  14761.  
  14762.    ************************************************************************
  14763.    UpdatingTablesDialog function
  14764.    ************************************************************************
  14765.    DECLARATION:
  14766.  
  14767.         function UpdatingTablesDialog : PDialog;
  14768.  
  14769.    UNIT:
  14770.  
  14771.         GLTVR_US.PAS
  14772.  
  14773.    DESCRIPTION:
  14774.  
  14775.         (see CreateOOGLDialogs)
  14776.  
  14777.  
  14778.  
  14779.  
  14780.  
  14781.  
  14782.  
  14783.  
  14784.  
  14785.  
  14786.  
  14787.  
  14788.  
  14789.  
  14790.  
  14791.  
  14792.  
  14793.  
  14794.  
  14795.  
  14796.  
  14797.  
  14798.  
  14799.  
  14800.  
  14801.  
  14802.  
  14803.  
  14804.  
  14805.  
  14806.  
  14807.  
  14808.  
  14809.  
  14810.  
  14811.  
  14812.  
  14813.  
  14814.  
  14815.  
  14816.  
  14817.                                         207
  14818.  
  14819.  
  14820.  
  14821.  
  14822.  
  14823.  
  14824.  
  14825.  
  14826.  
  14827.  
  14828.  
  14829.  
  14830.  
  14831.  
  14832.  
  14833.  
  14834.  
  14835.  
  14836.  
  14837.  
  14838.  
  14839.  
  14840.  
  14841.  
  14842.  
  14843.  
  14844.  
  14845.  
  14846.  
  14847.  
  14848.  
  14849.  
  14850.  
  14851.  
  14852.  
  14853.  
  14854.  
  14855.  
  14856.  
  14857.  
  14858.  
  14859.  
  14860.  
  14861.  
  14862.  
  14863.  
  14864.  
  14865.  
  14866.  
  14867.  
  14868.  
  14869.  
  14870.  
  14871.  
  14872.  
  14873.  
  14874.  
  14875.  
  14876.  
  14877.  
  14878.  
  14879.  
  14880.  
  14881.  
  14882.  
  14883.  
  14884.  
  14885.                                         208
  14886.  
  14887.  
  14888.  
  14889.  
  14890.  
  14891.  
  14892.  
  14893.  
  14894.    INDEX
  14895.  
  14896.    Add  62, 74, 76, 86, 87, 98,              object type ID's  3, 28
  14897.              192, 202                        standard help contexts 
  14898.    AddCell  127                                   3, 28
  14899.    AdjustAfter  67                           stream status   4
  14900.    Anchor  48                                string list index   4
  14901.    AnchorColShifted  49                 contents line  47
  14902.    AnchorRowShifted  49                 ContentsArea  134
  14903.    Attrib  110                          CopyCellBlock  135
  14904.    AUTHOR                               CopyString  53, 69, 80, 105,
  14905.         How to contact  1                         187, 197
  14906.    AutoCalc  127                        CreateItem  62, 74, 87, 100,
  14907.    BlankArea  128                                 192, 202
  14908.    BlockOn  128                         CreateOOGLDialogs  4, 9
  14909.    BlockOperation  6                    CreateOOGLStrings  4, 10
  14910.    Bucket  65, 66, 90, 129, 133,        CSheetInputLine  11
  14911.              183, 205                   CSpreadSheet  11
  14912.    CellHash  128                        CSpreadSheetBlackWhite  14
  14913.    CellHashStart  129                   CSpreadSheetColor  14
  14914.    CellInBlock  50                      CSpreadSheetMonochrome  14
  14915.    CellPos  4, 6                        CSpreadSheetWindow1  12
  14916.    CellsProtected  129                  CSpreadSheetWindow2  13
  14917.    CellToFString  129                   CurrBlock  135
  14918.    CellType  53, 69, 80, 105,           CurrCell  62, 100
  14919.              187, 197                   CurrCol  88, 202
  14920.    CellTypes  6                         CurrencyCharPart  14
  14921.    Change  92, 99                       CurrencyPart  15
  14922.    ChangeBounds  130                    CurrencyShift  15
  14923.    ChangeColHeaders  130                CurrencyStr  15
  14924.    ChangeColWidth  131                  CurrentKeyPosition  115
  14925.    ChangeHeaderDialog  6                CurrentRowPosition  116
  14926.    ChangeXXXX  7                        CurrFormat  74
  14927.    CheckForDragging  131                CurrKey  117
  14928.    ClearCurrBlock  131                  CurrLoc  63
  14929.    ClearScreenArea  132                 CurrName  88
  14930.    clipboard  7, 27, 135, 163,          CurrPos  100, 135
  14931.              169                        CurrStart  75, 192
  14932.    ClipBoardRecord  7                   CurrStop  75, 193
  14933.    cmXXXX  8                            CurrValue  54, 69, 80, 105,
  14934.    ColAdjustment  67, 160                         187, 197
  14935.    ColArea  132                         CurrWidth  203
  14936.    ColHeadersHash  132                  DataArea  136
  14937.    ColHeadersHashStart  133             DecPlacesPart  16
  14938.    ColStart  133                        DefaultColWidth  136, 203, 204
  14939.    ColStartArray  9                     DefaultCurrency  136
  14940.    ColToX  133                          DefaultDecimalPlaces  137
  14941.    Column                               DefaultXXXX   16
  14942.         default width  203-205          Delete  63, 76, 88, 101, 193,
  14943.         headers  2                                203
  14944.         width  2, 201-204, 206          DeleteBlock  137
  14945.    ColumnToString  134                  DeleteCell  137
  14946.    ColWidth  134                        DeleteColFromHash  138
  14947.    CommasPart  9                        DeleteColHeaders  138
  14948.    Constants                            DeleteColumns  139
  14949.         commands  3, 27                 DeleteRowFromHash  139
  14950.         default  4                      DeleteRows  140
  14951.         help contexts  3, 27, 29        DisplayAllCells  140
  14952.  
  14953.                                         209
  14954.  
  14955.  
  14956.  
  14957.  
  14958.  
  14959.  
  14960.  
  14961.  
  14962.    DisplayArea  140                     FormattedString  56, 71, 82,
  14963.    DisplayBlankArea  141                          106, 188, 198
  14964.    DisplayBlock  141                    FormatType  21
  14965.    DisplayBlockDiff  142                Formula  82
  14966.    DisplayCell  142                     FormulaHash  152
  14967.    DisplayCellBlock  142                FormulaOps  21
  14968.    DisplayCellData  143                 Formulas  2, 3
  14969.    DisplayCols  143                     FormulaStart  22
  14970.    DisplayFormulas  144                 Found  64, 76, 89, 103, 194,
  14971.    DisplayHeaders  144                            204
  14972.    DisplayInfo  144                     FStringSituationColor  152
  14973.    DisplayLimit  92                     General overview  1
  14974.    DisplayMessage  5, 17, 19, 31        GetColWidth  22
  14975.    DisplayRows  145                     GetColWidthFunc  23
  14976.    DisplayString  54, 70, 81,           GetData  5
  14977.              106, 187, 197              GetDefaultColWidth  203, 204
  14978.    DisplayXXXX  18                      GetFormat  152
  14979.    DoAfterEndInput  145                 GetFormula  82
  14980.    Done  55, 64, 76, 81, 89, 102,       GetPalette  113, 153, 184
  14981.              145, 187, 193, 204         GetWidthDialog  23
  14982.    DoneHashTables  146                  GLCELL.INT  2
  14983.    DragCursorWithMouse  146             GLEQUATES.PAS  3
  14984.    Draw  93, 96, 146                    GLLSTR.INT  191
  14985.    EditString  55, 70, 81, 106,         GLLSTR.PAS  1
  14986.              188, 197                   GLPARSER.INT  168
  14987.    EditXXXX  18                         GLPARSER.PAS  1
  14988.    Empty  18                            GLResFile  4, 23
  14989.    EmptyRowsAtBottom  147               GLSORT.PAS  3
  14990.    EmptyRowsAtTop  147                  GLSortExit   24
  14991.    EndCol  102                          GLStringList  4, 24
  14992.    EndModal  112                        GLSUPPRT.PAS  4
  14993.    EndState  112                        GLTSHEET.PAS  4
  14994.    EraseCellBlock  37, 148              GLTVR_US.PAS  4
  14995.    EraseMessage  5, 19, 31              GLVIEWS.PAS  5
  14996.    Error  81, 198                       GLWINDOW.PAS  5
  14997.    Execute  113                         GoToCell  153
  14998.    ExtendCurrBlock  35, 148             GoToDialog  24
  14999.    ExtendTo  50                         GoToEnd  153
  15000.    FillKeyRec  117                      HandleEvent  3, 93, 113, 154
  15001.    FindLastPos  148                     HandleInput  18, 154
  15002.    FindScreenColStart  149              HasError  71, 83, 106, 188,
  15003.    FindScreenColStop  149                         198
  15004.    FindScreenRowStart  150              HashError  57
  15005.    FindScreenRowStop  150               HashItem  62, 64-67, 78
  15006.    FirstItem  64                        HashItems  206
  15007.    FixBlockOverWrite  150               HashTable  2, 86
  15008.    FixFormulaCol  19                         Add  86
  15009.    FixFormulaRow  20                         CreateItem  86
  15010.    FixOverWrite  151                    HashValue  65, 77, 89, 103,
  15011.    Format  55, 70, 82, 106, 188,                  194, 205
  15012.              198                        hcCancel  28
  15013.         commas  9, 21, 32               hcNo  28
  15014.         currency  14-16, 21, 32         hcOk  28
  15015.         decimal places  16, 21          hcXXXX  3, 25
  15016.         justification  29               hcYes  28
  15017.    Format bits  21                      help system  12, 13
  15018.    FormatDefault  151                   info area  47, 145, 167, 170
  15019.    FormatDialog  20                     InfoArea  155
  15020.  
  15021.                                         210
  15022.  
  15023.  
  15024.  
  15025.  
  15026.  
  15027.  
  15028.  
  15029.  
  15030.    Init  50, 57, 65, 71, 77, 83,        MovePgRight  165
  15031.              89, 94, 96, 103,           MovePgUp  165
  15032.              107, 110, 114, 117,        MoveRight  166
  15033.              155, 184, 188, 194,        MoveUp  166
  15034.              205                        Name  58, 72, 84, 107, 189,
  15035.    InitClipboard  27                              199
  15036.    InitCommandNumber  3, 8, 27,         NextItem  64, 67
  15037.              46                         NoBlankArea  166
  15038.    InitCurrPos  156                     Number  167
  15039.    InitHelpContextNumber  3, 8,         NumberFormatShift  31
  15040.              25, 27, 46                 OldCurrPos  167
  15041.    InitObjectTypeID  3, 28              OldValue  95
  15042.    InitStandardContextNumber  3,        OOGridFileHeader  32, 47
  15043.              8, 25, 28, 46              Overwrite  78, 195
  15044.    input line  47                       OverwriteHash  167
  15045.    InputLine  28                        OverwriteHashStart  168
  15046.    InsertColumns  157                   OverwriteStart  59, 72, 84,
  15047.    InsertRows  157                                108, 189, 200
  15048.    InsertRowToHash  157                 Overwritten  59, 72, 84, 108,
  15049.    ItemSize  66, 77, 90, 103,                     190, 200
  15050.              194, 205                   Palettes
  15051.    Justification  29                         CSpreadSheetBlackWhite 
  15052.    JustPart  29                                   14
  15053.    KeyCols  118                              CSpreadSheetColor  14
  15054.    Keyposition  30                           CSpreadSheetMonochrome 
  15055.    KeyPressed  158                                14
  15056.    KeySortOrder  118                         standard application
  15057.    KeyValue  30                                   palette  5, 12-14
  15058.    LastKey  118                              TSheetInputLine  11
  15059.    LastPos  158                              TSpreadSheet  11, 184
  15060.    LegalValue  58, 71, 83, 107,              TSpreadSheetWindow  12,
  15061.              189, 199                             13
  15062.    Load  51, 66, 77, 83, 90, 94,        Parser  168
  15063.              107, 159, 189, 194,        PasteBlock  168
  15064.              199, 205                   PasteCellBlock  135, 164, 169
  15065.    LoadDelimited  159                   PasteDialog  32
  15066.    LoadHashTables  159                  PivotFirstKey  119
  15067.    LoadTablesFromTempFile  160          PivotSecondKey  119
  15068.    Loc  58                              PivotThirdKey  119
  15069.    LocateCursorWithMouse  161           PointInArea  111
  15070.    LowerRight  110                      Print  4, 169
  15071.    LowMemory  2, 46, 86                 PrintConfigRec  4
  15072.    Max  93                              PrintDialog  32
  15073.    MaxCols  161                         PrinterConfigRec  33
  15074.    MaxColWidth  161                     PrintingDialog  33
  15075.    MaxDecimalPlaces  162                PrintToDialog  33
  15076.    MaxRows  162                         QuickSort algorithm  4, 30,
  15077.    MaxScreenCols  162                             121
  15078.    MessageLine  17, 19, 31              RBlock  34
  15079.    Modified  163                        RChangeHeader  34
  15080.    ModifiedXXXX  31                     RChangeWidth  34
  15081.    MoveCell  163                        RCopyFormulas  35, 169
  15082.    MoveCellBlock  163                   README.TXT  1
  15083.    MoveDown  164                        Recalc  18, 169
  15084.    MoveHome  164                        RedrawXXXX  35
  15085.    MoveLeft  164                        RegisterGLCell  35
  15086.    MovePgDown  165                      RegisterGLSupprt  36
  15087.    MovePgLeft  165                      RegisterGLTSheet  36
  15088.  
  15089.                                         211
  15090.  
  15091.  
  15092.  
  15093.  
  15094.  
  15095.  
  15096.  
  15097.  
  15098.    RegisterGLViews  36                  SortingDialog  45
  15099.    RegisterSpreadSheet  37              SortObject  4, 178
  15100.    RemoveXXXX  37                       SortTypes  45
  15101.    RepeatChar  108                      SourceCellHash  122
  15102.    RepeatFirstChar  37                  SplitSortBlock   122
  15103.    RepeatTextChar  38                   Standard application palette 
  15104.    Resources  3, 4                                5
  15105.    RFormat  38                          StandardParser  168
  15106.    RFormulaCell  38                     StandardScrollBar  185
  15107.    RGoToCell  39                        StandardSortObject  4, 45
  15108.    RLimScrollBar  39                    Start  51
  15109.    RowAdjustment  67, 160               StatusMessage  17, 96
  15110.    RowArea  170                         Stop  51
  15111.    RowNumberSpace  170                  Store  52, 68, 79, 85, 91, 95,
  15112.    RowToY  171                                    109, 179, 190, 195,
  15113.    RPrint  40                                     200, 206
  15114.    RRepeatCell  40                      StoreHashTables  179
  15115.    RSheetInputLine  41                  StoreTablesToTempFile  179
  15116.    RSortInfo  41                        Stream
  15117.    RSpreadSheet  41                          additional status
  15118.    RTextCell  42                                  constants  4
  15119.    RValueCell  42                            registration records  3
  15120.    SameCellPos  171                     stRXXXX  46
  15121.    ScreenColRange  43                   stXXXX   46
  15122.    ScreenCols  43                       SwapRows  123
  15123.    ScreenPos  44                        sXXXX   47
  15124.    ScreenRowRange  44                   TBlock  4, 48
  15125.    ScreenRows  44                            Anchor   48, 49
  15126.    ScrollDraw  171                           AnchorColShifted   49
  15127.    Search  67, 75, 78, 90, 104,              AnchorRowShifted   49
  15128.              192, 195, 206                   CellInBlock  50
  15129.    SearchName  91                            ExtendTo  50
  15130.    SelectColumn  172                         Init  50
  15131.    SetAreas  172                             Load  51
  15132.    SetBlankArea  172                         Start  51
  15133.    SetChanged  31, 173                       Stop  51
  15134.    SetData  5                                Store  52
  15135.    SetKeyArray  120                     TCCell  2
  15136.    SetLimit  173                        TCell  2, 52
  15137.    SetLocked  2, 174                         CellType  53
  15138.    SetNameWithMouse  174                     CopyString  53
  15139.    SetNumber  174                            CurrValue  54
  15140.    SetPivot   121                            DisplayString  54
  15141.    SetProtection  175                        Done  55
  15142.    SetScreenColStart  176                    EditString  55
  15143.    SetScreenColStop  175                     Format  55
  15144.    SetScreenRowStart  176                    FormattedString  16, 56
  15145.    SetScreenRowStop  176                     HashError  57
  15146.    SetState  114, 177                        Init  57
  15147.    SetUnlocked  2, 177                       LegalValue  58
  15148.    SheetProtected  178                       Loc  58
  15149.    ShouldUpdate  60, 72, 84, 108,            Name  58
  15150.              190, 200                        OverwriteStart  59
  15151.    SizeLimits  185                           Overwritten  59
  15152.    Sort   121                                ShouldUpdate  60
  15153.    SortBlock  122                            Width  61
  15154.    SortData  178                        TCellHashTable  2, 61, 66
  15155.    SortDialog  45                            Add  62
  15156.  
  15157.                                         212
  15158.  
  15159.  
  15160.  
  15161.  
  15162.  
  15163.  
  15164.  
  15165.  
  15166.         CreateItem  62                       Format  82
  15167.         CurrCell  62                         FormattedString  82
  15168.         CurrLoc  63                          Formula  82
  15169.         Delete  63                           GetFormula  82
  15170.         Done  64                             HasError  83
  15171.         FirstItem  64                        Init  83
  15172.         Found  64, 65                        LegalValue  83
  15173.         HashValue  65                        Load  83
  15174.         Init  65                             Name  84
  15175.         ItemSize  66, 77                     OverwriteStart  84
  15176.         Load  66, 77                         Overwritten  84
  15177.         NextItem  67                         ShouldUpdate  84
  15178.         Search  65, 67                       Store  85
  15179.         Store  68                            Value  85
  15180.    TCHASH.INT  66, 86                        Width  85
  15181.    TCHASH.PAS  1, 2                     THashTable  2, 3, 85
  15182.    TColumnHeadersHashTable  2                Add  86
  15183.    TCUTIL.PAS  1                        THeadersHashTable  86
  15184.    TEmptyCell  2, 68                         Add  87
  15185.         CellType  69                         CreateItem  87
  15186.         CopyString  69                       CurrCol  88
  15187.         CurrValue  69                        CurrName  88
  15188.         DisplayString  70                    Delete  88
  15189.         EditString  70                       Done  89
  15190.         Format  70                           Found  89
  15191.         FormattedString  71                  HashValue  89
  15192.         HasError  71                         Init  89
  15193.         Init  71                             ItemSize  90
  15194.         LegalValue  71                       Load  90
  15195.         Name  72                             Search  90
  15196.         OverwriteStart  72                   SearchName  91
  15197.         Overwritten  72                      Store  91
  15198.         ShouldUpdate  72                TInputLine  5
  15199.         Width  73                       TLimScrollBar  5, 16, 91
  15200.    TFormatHashTable  2, 73                   Change  92
  15201.         Add  74, 76                          DisplayLimit  92
  15202.         CreateItem  74                       Draw  93
  15203.         CurrFormat  74                       HandleEvent  93
  15204.         CurrStart  75                        Init  94
  15205.         CurrStop  75                         Load  94
  15206.         Delete  76                           OldValue  95
  15207.         Done  76                             Store  95
  15208.         Found  76                       TMessageLine  5, 17, 19, 31,
  15209.         HashValue  77                             95
  15210.         Init  77                             Draw  96
  15211.         ItemSize  77                         Init  96
  15212.         Load  77                             StatusMessage  17, 96
  15213.         Overwrite  78                   ToggleAutoCalc  180
  15214.         Search  75, 78                  ToggleClipBoardOff  97
  15215.         Store  79                       ToggleClipBoardOn  97
  15216.    TFormulaCell  2                      ToggleDisplayHeaders  180
  15217.         CellType  80                    ToggleEnd  180
  15218.         CopyString  80                  ToggleFormulaDisplay  181
  15219.         CurrValue  80                   ToogleBlockOn  181
  15220.         DisplayString  81               Total  67
  15221.         Done  81                        TotalRows  181
  15222.         EditString  81                  TOverWriteHashTable  2, 23, 98
  15223.         Error  81                            Add  98
  15224.  
  15225.                                         213
  15226.  
  15227.  
  15228.  
  15229.  
  15230.  
  15231.  
  15232.  
  15233.  
  15234.         Change  99                           PivotFirstKey  119
  15235.         CreateItem  100                      PivotSecondKey  119
  15236.         CurrCell  100                        PivotThirdKey  119
  15237.         CurrPos  100                         SetKeyArray  120
  15238.         Delete  101                          SetPivot   121
  15239.         Done  102                            Sort   121
  15240.         EndCol  102                          SortBlock  122
  15241.         Found  103                           SourceCellHash  122
  15242.         HashValue  103                       SplitSortBlock   122
  15243.         Init  103                            SwapRows   123
  15244.         ItemSize  103                   TSpreadsheet  2-4, 14, 16, 24,
  15245.         Search  104                               47, 123, 184
  15246.    TrackCursor  181                          AddCell  127
  15247.    TRepeatCell  2, 104                       AutoCalc  127
  15248.         CellType  105                        BlankArea  128
  15249.         CopyString  105                      BlockOn  128
  15250.         CurrValue  105                       CellHash  128
  15251.         DisplayString  106                   CellHashStart  129
  15252.         EditString  106                      CellsProtected  129
  15253.         Format  106                          CellToFString  129
  15254.         FormattedString  106                 ChangeBounds  130
  15255.         HasError  106                        ChangeColHeaders  130
  15256.         Init  107                            ChangeColWidth  131
  15257.         LegalValue  107                      CheckForDragging  131
  15258.         Load  107                            ClearCurrBlock  131
  15259.         Name  107                            ClearScreenArea  132
  15260.         OverwriteStart  108                  ColArea  132
  15261.         Overwritten  108                     ColHeadersHash  132
  15262.         RepeatChar  108                      ColHeadersHashStart  133
  15263.         ShouldUpdate  108                    ColStart  133
  15264.         Store  109                           ColToX  133
  15265.         Width  109                           ColumnToString  134
  15266.    TScreenArea  4, 109                       ColWidth  134
  15267.         Attrib  110                          ContentsArea  134
  15268.         Init  110                            CopyCellBlock  135
  15269.         LowerRight  110                      CurrBlock  135
  15270.         PointInArea  111                     CurrPos  135, 145, 163
  15271.         UpperLeft  111                       DataArea  136
  15272.    TScrollBar  5                             DefaultColWidth  136
  15273.         Draw  93                             DefaultCurrency  136
  15274.         Max  93                              DefaultDecimalPlaces  137
  15275.    TSheetInputLine  5, 10, 111               DeleteBlock  137
  15276.         EndModal  112                        DeleteCell  137
  15277.         EndState  112, 113                   DeleteColFromHash  138
  15278.         Execute  113                         DeleteColHeaders  138
  15279.         GetPalette  113                      DeleteColumns  139
  15280.         HandleEvent  113                     DeleteRowFromHash  139
  15281.         Init  114                            DeleteRows  140
  15282.         SetState  114                        DisplayAllCells  140
  15283.    TSortObject  3, 115                       DisplayArea  140
  15284.         CurrentKeyPosition  115              DisplayBlankArea  141
  15285.         CurrentRowPosition  116              DisplayBlock  141
  15286.         CurrKey  117                         DisplayBlockDiff  142
  15287.         FillKeyRec  117                      DisplayCell  142
  15288.         Init  117                            DisplayCellBlock  142
  15289.         KeyCols  118                         DisplayCellData  143
  15290.         KeySortOrder  118                    DisplayCols  143
  15291.         LastKey  118, 121                    DisplayFormulas  144
  15292.  
  15293.                                         214
  15294.  
  15295.  
  15296.  
  15297.  
  15298.  
  15299.  
  15300.  
  15301.  
  15302.         DisplayHeaders  144                  MovePgUp  165
  15303.         DisplayInfo  144                     MoveRight  166
  15304.         DisplayRows  145                     MoveUp  166
  15305.         DoAfterEndInput  145                 NoBlankArea  166, 173
  15306.         Done  145                            Number  167
  15307.         DoneHashTables  146                  OldCurrPos  167
  15308.         DragCursorWithMouse  146             OverwriteHash  167
  15309.         Draw  146                            OverwriteHashStart  168
  15310.         EmptyRowsAtBottom  147               Parser  168
  15311.         EmptyRowsAtTop  147                  PasteBlock  168
  15312.         EraseCellBlock  37, 148              PasteCellBlock  135, 164,
  15313.         ExtendCurrBlock  35, 148                  169
  15314.         FindLastPos  148                     Print  4, 16, 169
  15315.         FindScreenColStart  149              Recalc  18, 169
  15316.         FindScreenColStop  149               RowArea  170
  15317.         FindScreenRowStart  150              RowNumberSpace  170
  15318.         FindScreenRowStop  150               RowToY  171
  15319.         FixBlockOverWrite  150               SameCellPos  171
  15320.         FixOverWrite  151                    ScrollDraw  171
  15321.         FormatDefault  151                   SelectColumn  172
  15322.         FormulaHash  152                     SetAreas  172
  15323.         FStringSituationColor                SetBlankArea  172
  15324.              152                             SetChanged  31, 173
  15325.         GetFormat  152                       SetLimit  173
  15326.         GetPalette  153                      SetLocked  2, 174
  15327.         GoToCell  153                        SetNameWithMouse  174
  15328.         GoToEnd  153                         SetNumber  174
  15329.         HandleEvent  3, 154                  SetProtection  175
  15330.         HandleInput  18, 154                 SetScreenColStart  176
  15331.         InfoArea  155                        SetScreenColStop  175
  15332.         Init  155                            SetScreenRowStart  176
  15333.         InitCurrPos  156                     SetScreenRowStop  176
  15334.         InsertColumns  157                   SetState  177
  15335.         InsertRows  157                      SetUnlocked  2, 177
  15336.         InsertRowToHash  157                 SheetProtected  178
  15337.         KeyPressed  158                      SortData  178
  15338.         LastPos  158                         SortObject  4, 178
  15339.         Load  159                            Store  179
  15340.         LoadDelimited  159                   StoreHashTables  179
  15341.         LoadHashTables  159                  StoreTablesToTempFile 
  15342.         LoadTablesFromTempFile                    179
  15343.              160                             ToggleAutoCalc  180
  15344.         LocateCursorWithMouse                ToggleDisplayHeaders  180
  15345.              161                             ToggleEnd  180
  15346.         MaxCols  161                         ToggleFormulaDisplay  181
  15347.         MaxColWidth  161                     ToogleBlockOn  181
  15348.         MaxDecimalPlaces  162                TotalRows  181
  15349.         MaxRows  162                         TrackCursor  181
  15350.         MaxScreenCols  162                   UnlockedHash  182
  15351.         Modified  163                        UpdateScreenBlockDisplay 
  15352.         MoveCell  163                             182
  15353.         MoveCellBlock  163                   WidthHash  182
  15354.         MoveDown  164                        WidthHashStart  183
  15355.         MoveHome  164                        XToCol  183
  15356.         MoveLeft  164                        YToRow  183
  15357.         MovePgDown  165                 TSpreadSheetWindow  5, 12, 13,
  15358.         MovePgLeft  165                           184
  15359.         MovePgRight  165                     GetPalette  184
  15360.  
  15361.                                         215
  15362.  
  15363.  
  15364.  
  15365.  
  15366.  
  15367.  
  15368.  
  15369.  
  15370.         Init  184                            ShouldUpdate  200
  15371.         SizeLimits  185                      Store  200
  15372.         StandardScrollBar  185               Value  200
  15373.    TStringList  24, 47                       Width  201
  15374.    TTextCell  2, 186                    TView  5
  15375.         CellType  187                   TWidthHashTable  2, 201
  15376.         CopyString  187                      Add  202
  15377.         CurrValue  187                       CreateItem  202
  15378.         DisplayString  187                   CurrCol  202
  15379.         Done  187                            CurrWidth  203
  15380.         EditString  188                      DefaultColWidth  203, 204
  15381.         Format  188                          Delete  203
  15382.         FormattedString  188                 Done  204
  15383.         HasError  188                        Found  204
  15384.         Init  188                            GetDefaultColWidth  203,
  15385.         LegalValue  189                           204
  15386.         Load  189                            HashValue  205
  15387.         Name  189                            Init  205
  15388.         OverwriteStart  189                  ItemSize  205
  15389.         Overwritten  190                     Load  205
  15390.         ShouldUpdate  190                    Search  206
  15391.         Store  190                           Store  206
  15392.         Txt  190                        TWindow  5
  15393.         Width  191                      Txt  190
  15394.    TUnlockedCellHashTable  2            UnlockedHash  182
  15395.         Search  192                     UpdateScreenBlockDisplay  182
  15396.    TUnlockedHashTable  191              UpdatingTablesDialog  207
  15397.         Add  192                        UpperLeft  111
  15398.         CreateItem  192                 Value  85, 200
  15399.         CurrStart  192                  Width  61, 73, 85, 109, 191,
  15400.         CurrStop  193                             201
  15401.         Delete  193                     WidthHash  182
  15402.         Done  193                       WidthHashStart  183
  15403.         Found  194                      XToCol  183
  15404.         HashValue  194                  YToRow  183
  15405.         Init  194
  15406.         ItemSize  194
  15407.         Load  194
  15408.         Overwrite  195
  15409.         Search  195
  15410.         Store  195
  15411.    Tutorial  1
  15412.    TValueCell  2, 196
  15413.         CellType  197
  15414.         CopyString  197
  15415.         CurrValue  197
  15416.         DisplayString  197
  15417.         EditString  197
  15418.         Error  198
  15419.         Format  198
  15420.         FormattedString  198
  15421.         HasError  198
  15422.         Init  198
  15423.         LegalValue  199
  15424.         Load  199
  15425.         Name  199
  15426.         OverwriteStart  200
  15427.         Overwritten  200
  15428.  
  15429.                                         216
  15430.  
  15431.  
  15432.  
  15433.  
  15434.  
  15435.  
  15436.